From 8900fe0004036d814f90d2981da5fbba6ccd0f01 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sat, 4 Jul 2026 14:51:55 +0200 Subject: [PATCH] feat(hyprlua): spawn filepicker dialog at 10% of the display Rename the at-cursor rule to filepicker and move the dialog to a fixed position 10% into the display (from the top-left) instead of following the cursor. Co-Authored-By: Claude Opus 4.8 --- desktopenvs/hyprlua/hypr/usr/binds.lua | 4 ++-- desktopenvs/hyprlua/hypr/usr/windowrules.lua | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desktopenvs/hyprlua/hypr/usr/binds.lua b/desktopenvs/hyprlua/hypr/usr/binds.lua index 279ef16..c769f14 100644 --- a/desktopenvs/hyprlua/hypr/usr/binds.lua +++ b/desktopenvs/hyprlua/hypr/usr/binds.lua @@ -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 +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")) +hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("[tag +filepicker] ~/.config/scripts/filepicker-clipboard.sh path")) +hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("[tag +filepicker] ~/.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")) diff --git a/desktopenvs/hyprlua/hypr/usr/windowrules.lua b/desktopenvs/hyprlua/hypr/usr/windowrules.lua index 36fa420..711eec5 100644 --- a/desktopenvs/hyprlua/hypr/usr/windowrules.lua +++ b/desktopenvs/hyprlua/hypr/usr/windowrules.lua @@ -73,12 +73,12 @@ hl.window_rule({ size = "(monitor_w*0.2) (monitor_h*0.2)", }) --- filepicker — float centred at cursor +-- filepicker — float near the top-left, 10% into the display hl.window_rule({ - name = "at-cursor", - match = { tag = "at-cursor" }, + name = "filepicker", + match = { tag = "filepicker" }, float = true, - move = "(cursor_x-(window_w/2)) (cursor_y-(window_h/2))", + move = "(monitor_w*0.1) (monitor_h*0.1)", }) -- spotify floating