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 <noreply@anthropic.com>
This commit is contained in:
parent
a673881fa5
commit
76bef27ac7
1 changed files with 5 additions and 0 deletions
|
|
@ -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 ;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue