anyrun: fix toggle keybind for daemon mode

anyrun close always exits 0, so "close || anyrun" never opened.
Use hyprctl clients to check if anyrun is visible before toggling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-30 11:51:21 +01:00
parent b1d748324d
commit 53d486ee68

View file

@ -262,7 +262,7 @@ in
-- Apps -- Apps
hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty")) hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty"))
hl.bind(mod .. " + E", hl.dsp.exec_cmd("nemo")) hl.bind(mod .. " + E", hl.dsp.exec_cmd("nemo"))
hl.bind(mod .. " + R", hl.dsp.exec_cmd("anyrun close || anyrun")) hl.bind(mod .. " + R", hl.dsp.exec_cmd("hyprctl clients -j | grep -q anyrun && anyrun close || anyrun"))
hl.bind(mod .. " + Q", hl.dsp.window.close()) hl.bind(mod .. " + Q", hl.dsp.window.close())
hl.bind(mod .. " + SHIFT + E", hl.dsp.exit()) hl.bind(mod .. " + SHIFT + E", hl.dsp.exit())