diff --git a/modules/config/bin/randomWallpaper.nix b/modules/config/bin/randomWallpaper.nix index 2dc3d87..e9be064 100644 --- a/modules/config/bin/randomWallpaper.nix +++ b/modules/config/bin/randomWallpaper.nix @@ -2,10 +2,16 @@ pkgs.writeShellApplication { name = "randomWallpaper"; - runtimeInputs = with pkgs; [ findutils coreutils feh ]; + runtimeInputs = with pkgs; [ findutils coreutils feh hyprland jq ]; text = '' wallpaper="$(find ~/.config/wallpapers/ -type f,l | shuf -n 1)" - feh --bg-fill "$wallpaper" + if [ -z ''${WAYLAND_DISPLAY+x} ]; then + feh --bg-fill "$wallpaper" + else + hyprctl hyprpaper preload "$wallpaper" + hyprctl monitors -j | jq '.[].name' | xargs -I{} hyprctl hyprpaper wallpaper '{}',"$wallpaper" + hyprctl hyprpaper unload all + fi ''; } diff --git a/modules/config/wallpapers/dracula.png b/modules/config/wallpapers/dracula.png deleted file mode 100644 index c7c1a74..0000000 Binary files a/modules/config/wallpapers/dracula.png and /dev/null differ diff --git a/modules/config/wallpapers/little-ships.jpg b/modules/config/wallpapers/little-ships.jpg deleted file mode 100644 index d18df20..0000000 Binary files a/modules/config/wallpapers/little-ships.jpg and /dev/null differ diff --git a/modules/config/wallpapers/little-ships.png b/modules/config/wallpapers/little-ships.png new file mode 100644 index 0000000..739e71b Binary files /dev/null and b/modules/config/wallpapers/little-ships.png differ diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 0ffe5d1..943db5e 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -198,4 +198,5 @@ in bindm = $mainMod, mouse:273, resizewindow exec-once=synology-drive + exec-once=randomWallpaper ''