2024-12-13 16:58 : id 466

This commit is contained in:
deadvey 2024-12-13 16:58:29 +00:00
parent dbebb72666
commit c8fba86a9d
2 changed files with 16 additions and 17 deletions

View File

@ -1,7 +1,7 @@
{config, pkgs, lib, ... }:
let
# Theme/Mode
THEME = "solarized";
THEME = "nord";
MODE = "dark";
# Colours
@ -95,9 +95,10 @@ in
file = {
"scripts/wallpaper-updater.sh" = {
text = ''
#magick ${WALLPAPER_PATH} -fuzz 10% -fill "#${BG}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)" ${WALLPAPER_PATH}
#magick ${WALLPAPER_PATH} -fuzz 10% -fill "#${ACCENT}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{3475,1627}]" info:-)" ${WALLPAPER_PATH}
file="";
while sleep 1; do
new_file=$(cat ${WALLPAPER_PATH})
if [[ "$new_file" != "$file" ]]; then
magick ${WALLPAPER_PATH} \
-fuzz 10% -fill "#${BG}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)" \
-fuzz 10% -fill "#${ACCENT}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{3475,1627}]" info:-)" \
@ -105,6 +106,9 @@ in
oldid=$(pgrep wpaperd)
wpaperd &
kill $oldid
fi
file=$new_file
done
'';
executable = true;
};
@ -114,12 +118,7 @@ in
echo mode = $2
sed -i "s/THEME\ =\ ".*"/THEME\ =\ \"''${1}\";/" $HOME/.config/home-manager/home.nix
sed -i "s/MODE\ =\ ".*"/MODE\ =\ \"''${2}\";/" $HOME/.config/home-manager/home.nix
home-manager switch &
sleep 5
bash $HOME/scripts/wallpaper-updater.sh
oldid=$(pgrep wpaperd)
wpaperd &
kill $oldid
home-manager switch
'';
executable = true;
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB