From 823d8b9bb6e305881819186e31f1dd12a61a2690 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 7 Nov 2025 02:26:13 +0100 Subject: [PATCH] fix(Hyprland): fix wlr-which-key and hyprpaper scripts --- users/modules/desktop/hyprpaper.nix | 5 +++-- users/phundrak/wlr-which-key/center-window.nix | 2 +- users/phundrak/wlr-which-key/close-window.nix | 2 +- users/phundrak/wlr-which-key/default.nix | 7 ++++++- users/phundrak/wlr-which-key/float-window.nix | 3 +-- users/phundrak/wlr-which-key/focus-urgent.nix | 2 +- users/phundrak/wlr-which-key/fullscreen.nix | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/users/modules/desktop/hyprpaper.nix b/users/modules/desktop/hyprpaper.nix index 24fd32d..d74aa05 100644 --- a/users/modules/desktop/hyprpaper.nix +++ b/users/modules/desktop/hyprpaper.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: with lib; let @@ -43,7 +44,7 @@ in { }; Service = { Type = "oneshot"; - ExecCondition = "pidof Hyprland"; + ExecCondition = "${pkgs.procps}/bin/pidof Hyprland"; ExecStart = "${config.home.homeDirectory}/.config/hypr/hyprpaper-rotate.sh"; }; }; @@ -79,7 +80,7 @@ in { echo "Setting wallpaper to: $WP" # Load and set the wallpaper - hyprctl hyprpaper preload "$WP" && hyprctl hyprpaper wallpaper ",$WP" + ${pkgs.hyprland}/bin/hyprctl hyprpaper preload "$WP" && ${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ",$WP" ''; executable = true; }; diff --git a/users/phundrak/wlr-which-key/center-window.nix b/users/phundrak/wlr-which-key/center-window.nix index 12d86fb..761f7c9 100644 --- a/users/phundrak/wlr-which-key/center-window.nix +++ b/users/phundrak/wlr-which-key/center-window.nix @@ -1,4 +1,4 @@ {pkgs, ...}: pkgs.writeShellScriptBin "center-window" '' - pidof -x Hyprland && hyprctl dispatch centerwindow + ${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch centerwindow '' diff --git a/users/phundrak/wlr-which-key/close-window.nix b/users/phundrak/wlr-which-key/close-window.nix index d55d3ff..4eb008f 100644 --- a/users/phundrak/wlr-which-key/close-window.nix +++ b/users/phundrak/wlr-which-key/close-window.nix @@ -1,4 +1,4 @@ {pkgs, ...}: pkgs.writeShellScriptBin "close-window" '' - pidof -x Hyprland && hyprctl dispatch killactive + ${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch killactive '' diff --git a/users/phundrak/wlr-which-key/default.nix b/users/phundrak/wlr-which-key/default.nix index 5fc2322..f1194ed 100644 --- a/users/phundrak/wlr-which-key/default.nix +++ b/users/phundrak/wlr-which-key/default.nix @@ -74,6 +74,11 @@ desc = "Bluetooth"; cmd = "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"; } + { + key = "c"; + desc = "calc"; + cmd = "rofi -show calc"; + } { key = "e"; desc = "Emoji"; @@ -82,7 +87,7 @@ { key = "r"; desc = "App Menu"; - cmd = "rofi -combi-modi drun,calc -show combi"; + cmd = "rofi -show drun"; } { key = "s"; diff --git a/users/phundrak/wlr-which-key/float-window.nix b/users/phundrak/wlr-which-key/float-window.nix index 43ff4b7..8be7b92 100644 --- a/users/phundrak/wlr-which-key/float-window.nix +++ b/users/phundrak/wlr-which-key/float-window.nix @@ -1,5 +1,4 @@ {pkgs, ...}: pkgs.writeShellScriptBin "float" '' - pidof -x Hyprland && hyprctl dispatch togglefloating - echo test + ${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch togglefloating '' diff --git a/users/phundrak/wlr-which-key/focus-urgent.nix b/users/phundrak/wlr-which-key/focus-urgent.nix index 5751382..22e28fb 100644 --- a/users/phundrak/wlr-which-key/focus-urgent.nix +++ b/users/phundrak/wlr-which-key/focus-urgent.nix @@ -1,4 +1,4 @@ {pkgs, ...}: pkgs.writeShellScriptBin "focus-urgent" '' - pidof -x Hyprland && hyprctl dispatch focusurgentorlast + ${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch focusurgentorlast '' diff --git a/users/phundrak/wlr-which-key/fullscreen.nix b/users/phundrak/wlr-which-key/fullscreen.nix index d05070d..cb0ad28 100644 --- a/users/phundrak/wlr-which-key/fullscreen.nix +++ b/users/phundrak/wlr-which-key/fullscreen.nix @@ -1,4 +1,4 @@ {pkgs, ...}: pkgs.writeShellScriptBin "fullscreen" '' - pidof -x Hyprland && hyprctl dispatch fullscreen + ${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch fullscreen ''