diff --git a/homeManagerModules/default.nix b/homeManagerModules/default.nix index 18d24f4a..75747ffb 100644 --- a/homeManagerModules/default.nix +++ b/homeManagerModules/default.nix @@ -27,4 +27,6 @@ templates = lib.mkDefault "${config.home.homeDirectory}/tmplts"; extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";}; }; + + xdg.dataFile."backgrounds/".source = ./files/wallpapers; } diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix index 4a0f9495..ddcf3b71 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix @@ -18,26 +18,5 @@ desktopEnv.hyprland.hyprpaper.randomWallpaper.enable = lib.mkDefault true; xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; - - xdg.configFile."hypr/wallpapers/evening-sky.png".source = - ./wallpapers/evening-sky.png; - xdg.configFile."hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg".source = - ./wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-6d7xmx.jpg".source = - ./wallpapers/wallhaven-6d7xmx.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-83v96o.png".source = - ./wallpapers/wallhaven-83v96o.png; - xdg.configFile."hypr/wallpapers/wallhaven-285rjm.jpg".source = - ./wallpapers/wallhaven-285rjm.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-4219wy.jpg".source = - ./wallpapers/wallhaven-4219wy.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-4267k6.jpg".source = - ./wallpapers/wallhaven-4267k6.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-d6ggel.jpg".source = - ./wallpapers/wallhaven-d6ggel.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-q2o2w5.jpg".source = - ./wallpapers/wallhaven-q2o2w5.jpg; - xdg.configFile."hypr/wallpapers/wallhaven-zm7x5o.jpg".source = - ./wallpapers/wallhaven-zm7x5o.jpg; }; } diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix index ea9bc8f3..67212dc3 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix @@ -5,7 +5,7 @@ ... }: let hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" '' - directory=${config.home.homeDirectory}/.config/hypr/wallpapers + directory=${config.home.homeDirectory}/.local/share/backgrounds monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'` if [ -d "$directory" ]; then @@ -13,7 +13,7 @@ sleep 30 hyprctl hyprpaper unload all for m in ''${monitor[@]}; do - random_background=$(ls $directory/* | shuf -n 1) + random_background=$(ls $directory/*.{png,jpg} | shuf -n 1) hyprctl hyprpaper preload $random_background hyprctl hyprpaper wallpaper "$m,$random_background" done diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf index 1644ac6b..270b7a56 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper.conf @@ -1,5 +1,5 @@ -preload = ~/.config/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg +preload = ~/.local/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg -wallpaper = ,~/.config/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg +wallpaper = ,~/.local/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg splash = false \ No newline at end of file diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/evening-sky.png b/homeManagerModules/files/wallpapers/evening-sky.png similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/evening-sky.png rename to homeManagerModules/files/wallpapers/evening-sky.png diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg b/homeManagerModules/files/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg rename to homeManagerModules/files/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-285rjm.jpg b/homeManagerModules/files/wallpapers/wallhaven-285rjm.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-285rjm.jpg rename to homeManagerModules/files/wallpapers/wallhaven-285rjm.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-4219wy.jpg b/homeManagerModules/files/wallpapers/wallhaven-4219wy.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-4219wy.jpg rename to homeManagerModules/files/wallpapers/wallhaven-4219wy.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-4267k6.jpg b/homeManagerModules/files/wallpapers/wallhaven-4267k6.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-4267k6.jpg rename to homeManagerModules/files/wallpapers/wallhaven-4267k6.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-6d7xmx.jpg b/homeManagerModules/files/wallpapers/wallhaven-6d7xmx.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-6d7xmx.jpg rename to homeManagerModules/files/wallpapers/wallhaven-6d7xmx.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-83v96o.png b/homeManagerModules/files/wallpapers/wallhaven-83v96o.png similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-83v96o.png rename to homeManagerModules/files/wallpapers/wallhaven-83v96o.png diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-d6ggel.jpg b/homeManagerModules/files/wallpapers/wallhaven-d6ggel.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-d6ggel.jpg rename to homeManagerModules/files/wallpapers/wallhaven-d6ggel.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-q2o2w5.jpg b/homeManagerModules/files/wallpapers/wallhaven-q2o2w5.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-q2o2w5.jpg rename to homeManagerModules/files/wallpapers/wallhaven-q2o2w5.jpg diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-zm7x5o.jpg b/homeManagerModules/files/wallpapers/wallhaven-zm7x5o.jpg similarity index 100% rename from homeManagerModules/desktopEnv/hypr/hyprpaper/wallpapers/wallhaven-zm7x5o.jpg rename to homeManagerModules/files/wallpapers/wallhaven-zm7x5o.jpg