2024-12-12 15:24 : id 394

This commit is contained in:
deadvey 2024-12-12 15:24:20 +00:00
parent 7093809917
commit 3300740860

View File

@ -100,12 +100,9 @@ in
text = ''
file=""
while [ 1 == 1 ]; do
new_file=$(cat $HOME/.config/home-manager/themes/wallpaper.png)
new_file=$(cat $HOME/scripts/wallpaper-updater.sh)
if [[ "$new_file" != "$file" ]]; then
echo "restarting hyprpaper"
kill -9 $(pgrep hyprpaper)
sleep 0.1
hyprpaper &
bash $HOME/scripts/wallpaper-updater.sh
fi
file=$new_file
done
@ -114,8 +111,11 @@ in
};
"scripts/wallpaper-updater.sh" = {
text = ''
magick ${WALLPAPER_PATH} -fuzz 10% -fill "#${BG}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)
magick ${WALLPAPER_PATH} -fuzz 10% -fill "#${BG}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)
" ${WALLPAPER_PATH}
kill -9 $(pgrep hyprpaper)
sleep 1
hyprpaper &
'';
executable = true;
};