From 76bef27ac7b378cea49707d0ee6b89c423577cb5 Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 18 May 2026 12:30:28 +0100 Subject: [PATCH] anyrun: restart daemon after standalone power menu use The power menu runs anyrun in standalone stdin mode, which kills the daemon. Explicitly quit the daemon before, then restart it after the standalone invocation so the launcher stays fast. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 9d7e217..5fdfa43 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -201,6 +201,9 @@ in extraConfig = let powerMenu = pkgs.writeShellScript "power-menu" '' + # Kill the daemon before using anyrun in standalone stdin mode; + # a concurrent standalone instance conflicts with the daemon. + ${pkgs.anyrun}/bin/anyrun quit 2>/dev/null || true choice=$(printf '%s\n' \ $'\uf023 Lock' \ $'\uf08b Logout' \ @@ -211,6 +214,8 @@ in --show-results-immediately true \ --hide-plugin-info true \ --close-on-click true) + # Restart the daemon for instant launcher opens. + ${pkgs.anyrun}/bin/anyrun daemon & case "$choice" in *Lock) ${pkgs.hyprlock}/bin/hyprlock ;; *Logout) hyprctl dispatch exit ;;