better wallpaper restoring

This commit is contained in:
EdenQwQ 2025-10-06 17:17:28 +08:00
parent 91496e3691
commit 77007dab23
2 changed files with 15 additions and 4 deletions

View file

@ -29,16 +29,26 @@ let
swww kill
swww-daemon --namespace "background" &
swww-daemon --namespace "backdrop" &
swww restore --namespace "background"
swww restore --namespace "backdrop"
# swww restore --namespace "background"
# swww restore --namespace "backdrop"
clash-meta -d ~/.config/clash &
wlsunset -s 00:00 -S 00:00 -t 5000 -T 5001 &
''
+ (
builtins.attrNames config.monitors
|> map (monitor: [
"swww img --namespace background -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/.cache/swww/${monitor}-file)\""
"swww img --namespace backdrop -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/.cache/swww/${monitor}-blurred-file)\""
])
|> builtins.concatLists
|> builtins.concatStringsSep "\n"
)
+ "\n"
+ (
if config.desktopShell == "caelestia" then
# bash
''
caelestia wallpaper -f "$HOME/Pictures/Wallpapers/generated/$(cat ~/.cache/swww/${config.lib.monitors.mainMonitorName}-file)"
caelestia wallpaper -f "/home/${user}/Pictures/Wallpapers/generated/$(cat ~/.cache/swww/${config.lib.monitors.mainMonitorName}-file)"
caelestia scheme set -n dynamic -m dark
''
else