From f5303b4f2fd54d0fecd17b3e001d153cd95620ea Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 12 Aug 2024 21:32:04 -0400 Subject: [PATCH] waybar/app-close: kill with swaymsg if hyprctl fails --- homeManagerModules/services/waybar/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/services/waybar/default.nix b/homeManagerModules/services/waybar/default.nix index a67e276a..e1bba9bc 100644 --- a/homeManagerModules/services/waybar/default.nix +++ b/homeManagerModules/services/waybar/default.nix @@ -80,9 +80,9 @@ in { tooltip-format = "{app}: {title}"; }; - "custom/hyprland-close" = { + "custom/app-close" = { on-click = ''${lib.getExe' - config.wayland.windowManager.hyprland.package "hyprctl"} dispatch killactive''; + config.wayland.windowManager.hyprland.package "hyprctl"} dispatch killactive || ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} kill''; format = "󰅗"; tooltip-format = "Close the focused window."; }; @@ -250,7 +250,7 @@ in { modules = ["custom/menu"] ++ lib.optional (cfg.desktop.hyprland.tabletMode.enable) - "custom/hyprland-close"; + "custom/app-close"; orientation = "horizontal"; }; @@ -302,7 +302,7 @@ in { #bluetooth, #clock, #custom-dnd, - #custom-hyprland-close, + #custom-app-close, #custom-logout, #custom-menu, #idle_inhibitor,