From 2408db09362fdc97be2a7b174a1ac5c0cf06076e Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 24 Apr 2024 19:15:48 -0400 Subject: [PATCH] hyprland: specify package from hyprland flake hyprland: scripts link to hyprland version from build --- homeManagerModules/desktop/hypr/default.nix | 2 ++ .../desktop/hypr/hyprpaper/hyprpaper-random.nix | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/desktop/hypr/default.nix b/homeManagerModules/desktop/hypr/default.nix index a5c24cfd..4b1d707f 100644 --- a/homeManagerModules/desktop/hypr/default.nix +++ b/homeManagerModules/desktop/hypr/default.nix @@ -3,6 +3,7 @@ lib, config, osConfig, + hyprland, ... }: { imports = [./hypridle ./hyprlock ./hyprpaper ./hyprshade ./theme.nix]; @@ -72,6 +73,7 @@ }; wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.package = hyprland.packages.${pkgs.system}.hyprland; wayland.windowManager.hyprland.extraConfig = let modifier = "SUPER"; diff --git a/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper-random.nix b/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper-random.nix index 717bd258..4b71e404 100644 --- a/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper-random.nix +++ b/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper-random.nix @@ -10,12 +10,12 @@ if [ -d "$directory" ]; then while true; do sleep 30 - hyprctl hyprpaper unload all - monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'` + ${config.wayland.windowManager.hyprland.package}/bin/hyprctl hyprpaper unload all + monitor=`${config.wayland.windowManager.hyprland.package}/bin/hyprctl monitors | grep Monitor | awk '{print $2}'` for m in ''${monitor[@]}; do random_background=$(ls $directory/*.{png,jpg} | shuf -n 1) - hyprctl hyprpaper preload $random_background - hyprctl hyprpaper wallpaper "$m,$random_background" + ${config.wayland.windowManager.hyprland.package}/bin/hyprctl hyprpaper preload $random_background + ${config.wayland.windowManager.hyprland.package}/bin/hyprctl hyprpaper wallpaper "$m,$random_background" done sleep 870 done