From 051b44df9f4748f94abd5d0975a6edfd4c96a0ff Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 12 Jan 2025 17:55:20 -0800 Subject: [PATCH] fix(home): Don't hardcode hyprctl --- modules/home/services/waybar/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/home/services/waybar/default.nix b/modules/home/services/waybar/default.nix index 0b15e38..15d1bb2 100644 --- a/modules/home/services/waybar/default.nix +++ b/modules/home/services/waybar/default.nix @@ -38,15 +38,18 @@ in { "clock" ]; - "hyprland/workspaces" = { + "hyprland/workspaces" = let + hyprctl = + lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"; + in { format = "{name}"; format-icons = { default = " "; active = " "; urgent = " "; }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + on-scroll-up = "${hyprctl} dispatch workspace e+1"; + on-scroll-down = "${hyprctl} dispatch workspace e-1"; }; "clock" = {