waybar/app-close: kill with swaymsg if hyprctl fails
Some checks failed
git-mirror / gitlab-sync (push) Has been cancelled
nix-build / default-build (push) Has been cancelled
nix-build / fallarbor-build (push) Has been cancelled
nix-build / lavaridge-build (push) Has been cancelled
nix-build / mauville-build (push) Has been cancelled
nix-build / petalburg-build (push) Has been cancelled
nix-build / rustboro-build (push) Has been cancelled
nix-check / fmt-check (push) Has been cancelled
nix-check / eval-check (push) Has been cancelled

This commit is contained in:
Aly Raffauf 2024-08-12 21:32:04 -04:00
parent 83b7b56eeb
commit f5303b4f2f

View file

@ -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,