mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 02:08:29 +02:00
fix: copy polybar's themes into this repo
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
{polybar-themes, ...} : (_: super: {
|
||||
polybar-themes-simple = super.callPackage ./package.nix { inherit polybar-themes;};
|
||||
})
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
polybar-themes,
|
||||
...
|
||||
}:
|
||||
|
||||
# use the themes provided by:
|
||||
# https://github.com/adi1090x/polybar-themes
|
||||
pkgs.nuenv.mkDerivation {
|
||||
name = "polybar-themes-simple";
|
||||
src = polybar-themes;
|
||||
debug = true;
|
||||
packages = [pkgs.coreutils];
|
||||
build = ''
|
||||
let out_fonts = $"($env.out)/fonts"
|
||||
mkdir $out_fonts
|
||||
cp -rf fonts/* $out_fonts
|
||||
|
||||
let out_themes = $"($env.out)/themes"
|
||||
mkdir $out_themes
|
||||
cp -rf simple/* $out_themes
|
||||
|
||||
# adjust the font size
|
||||
ls "simple/**/config.ini" | each { |it|
|
||||
let tmp_it = $"tmp/($it.name)"
|
||||
# prepare the output directory
|
||||
$tmp_it | path dirname | mkdir $in
|
||||
echo $"cusomizing ($it.name) and saving to ($tmp_it)"
|
||||
|
||||
open $it.name
|
||||
# remova all font settings
|
||||
| str replace --all --multiline -r "font-[0-4].*=.+|height.*=.+" ""
|
||||
# add hidpi font settings
|
||||
| append "
|
||||
height = 64
|
||||
; Text Fonts
|
||||
font-0 = Iosevka Nerd Font:style=Medium:size=15;4
|
||||
|
||||
; Icons Fonts
|
||||
font-1 = feather:style=Medium:size=24;3
|
||||
|
||||
; Powerline Glyphs
|
||||
font-2 = Iosevka Nerd Font:style=Medium:size=32;3
|
||||
|
||||
; Larger font size for bar fill icons
|
||||
font-3 = Iosevka Nerd Font:style=Medium:size=24;4
|
||||
|
||||
; Smaller font size for shorter spaces
|
||||
font-4 = Iosevka Nerd Font:style=Medium:size=12;4
|
||||
"
|
||||
| save -f $tmp_it
|
||||
}
|
||||
|
||||
echo "all the themes:"
|
||||
let log = ls tmp/**/*
|
||||
echo $log
|
||||
echo "copying the tmp themes to ($out_themes)"
|
||||
cp -rf tmp/simple/* $out_themes
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user