Compare commits
6 Commits
8ca1026552
...
654606df86
| Author | SHA1 | Date |
|---|---|---|
|
|
654606df86 | |
|
|
54338f3602 | |
|
|
d9e6ee0f10 | |
|
|
8900fe0004 | |
|
|
3324e669bb | |
|
|
403023c096 |
|
|
@ -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("~/.config/scripts/filepicker-clipboard.sh path"))
|
||||
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.exec_cmd("~/.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"))
|
||||
|
|
|
|||
|
|
@ -73,6 +73,22 @@ hl.window_rule({
|
|||
size = "(monitor_w*0.2) (monitor_h*0.2)",
|
||||
})
|
||||
|
||||
-- filepicker — float, fixed 760x460, centred on the cursor.
|
||||
-- The size and move must be kept in sync by hand: Hyprland evaluates `move`
|
||||
-- using the window's *natural* size and only then applies `size`, resizing
|
||||
-- from the top-left. Using cursor_x-(window_w/2) would therefore centre the
|
||||
-- natural (~1274x714) window and leave the shrunk one off-cursor, so the
|
||||
-- offsets below are hard-coded to half the final size (380x230). zenity's
|
||||
-- file chooser ignores --width/--height and has a ~738x363 GTK minimum, so
|
||||
-- 760x460 is about as small as it goes while landing exactly on the pointer.
|
||||
hl.window_rule({
|
||||
name = "filepicker",
|
||||
match = { tag = "filepicker" },
|
||||
float = true,
|
||||
size = "760 460",
|
||||
move = "(cursor_x-380) (cursor_y-230)",
|
||||
})
|
||||
|
||||
-- spotify floating
|
||||
hl.window_rule({
|
||||
name = "spotify-float",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ set -euo pipefail
|
|||
mode="${1:-path}"
|
||||
|
||||
# zenity exits non-zero on cancel/close -> treat as a no-op.
|
||||
# Float/size/cursor-centering are handled by the +filepicker window rule.
|
||||
file="$(zenity --file-selection --title="Copy file ${mode} to clipboard")" || exit 0
|
||||
[ -n "$file" ] || exit 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue