feat: screenshots answer with a thumbnail notification
All four Print binds go through hypr/scripts/shot.sh. Every capture lands on the clipboard and posts a notification showing the picture, with Open, Save (for clipboard captures, which wait in the runtime dir) and Edit when satty is installed. Cancelling the region picker does nothing. Notification cards now load images passed as a path hint: Quickshell routes those through the icon provider, which returned a placeholder.
This commit is contained in:
1 parent
373584f34e
commit
31b57f4f8c
3 files changed
+88
-5
No files matched your search
@@ -5,10 +5,13 @@ local scripts = os.getenv("HOME") .. "/.config/hypr/scripts/"
|
||||
-- ------------------------------------------------------------- screenshots
|
||||
-- PRINT selects a region, CTRL grabs the focused window, SHIFT saves to disk
|
||||
-- instead of the clipboard.
|
||||
hl.bind("PRINT", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy'))
|
||||
hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd('grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +\'%Y-%m-%d_%H-%M-%S\').png'))
|
||||
hl.bind("CTRL + PRINT", hl.dsp.exec_cmd(scripts .. "screenshot_window.sh copy"))
|
||||
hl.bind("CTRL + SHIFT + PRINT", hl.dsp.exec_cmd(scripts .. "screenshot_window.sh save"))
|
||||
-- All four go through scripts/shot.sh, which also posts a notification with
|
||||
-- the capture as its thumbnail (Open, Edit with satty, Save).
|
||||
local shot = scripts .. "shot.sh "
|
||||
hl.bind("PRINT", hl.dsp.exec_cmd(shot .. "region copy"), { description = "screenshot an area to the clipboard" })
|
||||
hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd(shot .. "region save"), { description = "screenshot an area to a file" })
|
||||
hl.bind("CTRL + PRINT", hl.dsp.exec_cmd(shot .. "window copy"), { description = "screenshot the window to the clipboard" })
|
||||
hl.bind("CTRL + SHIFT + PRINT", hl.dsp.exec_cmd(shot .. "window save"), { description = "screenshot the window to a file" })
|
||||
|
||||
-- ------------------------------------------------------- replay and camera
|
||||
-- On release, so the shortcut is not caught mid-chord.
|
||||
|
||||
Reference in new issue
Block a user