feat(hyprlua): spawn filepicker dialog at cursor via +at-cursor tag

Add a dedicated at-cursor window rule (float + move to cursor) and point
the Super+F / Super+Shift+F filepicker binds at it, so the zenity dialog
opens centered on the mouse instead of mid-screen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/astal-menu
Amir Alexander Abdelbaki 2026-07-04 14:50:10 +02:00
parent 403023c096
commit 3324e669bb
2 changed files with 10 additions and 2 deletions

View File

@ -52,8 +52,8 @@ hl.bind(mainMod .. " + SHIFT + R", hl.dsp.exec_cmd("wofi --show drun"))
hl.bind("CTRL + SHIFT + R", hl.dsp.exec_cmd(menu))
-- File picker dialog -> clipboard (path / contents)
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("[tag +centered] ~/.config/scripts/filepicker-clipboard.sh path"))
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("[tag +centered] ~/.config/scripts/filepicker-clipboard.sh content"))
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("[tag +at-cursor] ~/.config/scripts/filepicker-clipboard.sh path"))
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("[tag +at-cursor] ~/.config/scripts/filepicker-clipboard.sh content"))
-- old:
-- hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("~/.config/scripts/wofi-file-search.sh"))
-- hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("~/.config/scripts/foldersearch.sh"))

View File

@ -73,6 +73,14 @@ hl.window_rule({
size = "(monitor_w*0.2) (monitor_h*0.2)",
})
-- filepicker — float centred at cursor
hl.window_rule({
name = "at-cursor",
match = { tag = "at-cursor" },
float = true,
move = "(cursor_x-(window_w/2)) (cursor_y-(window_h/2))",
})
-- spotify floating
hl.window_rule({
name = "spotify-float",