From 4242d5cdd5b0cdc07de7c2a21014a665a5756548 Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 27 Oct 2024 14:40:37 -0500 Subject: [PATCH] menu: add ability to close menu with invocation Signed-off-by: Myned --- options/custom/scripts/default.nix | 3 +++ options/custom/scripts/menu.sh | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/options/custom/scripts/default.nix b/options/custom/scripts/default.nix index a7db8db..243fc68 100644 --- a/options/custom/scripts/default.nix +++ b/options/custom/scripts/default.nix @@ -107,6 +107,9 @@ in { libnotify ]) (bash "menu" [ + coreutils + hyprland + jq networkmanager_dmenu rofi-rbw walker diff --git a/options/custom/scripts/menu.sh b/options/custom/scripts/menu.sh index ddfb9fe..1f3c226 100644 --- a/options/custom/scripts/menu.sh +++ b/options/custom/scripts/menu.sh @@ -52,4 +52,9 @@ while (("$#" > 0)); do shift done -$command +# HACK: Restart service to close existing menu +if hyprctl -j layers | jq -e '.[][][][] | select(.namespace == "walker")'; then + systemctl --user restart walker.service +else + $command +fi