feat: use grim, slurp and satty for screenshots
This commit is contained in:
@@ -4,32 +4,40 @@ end
|
||||
|
||||
hl.define_submap("screenshot", function()
|
||||
hl.bind("y", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-file"))
|
||||
hl.dispatch(hl.dsp.exec_cmd('grim -g "$(slurp -d)" - | wl-copy'))
|
||||
exit_submap()
|
||||
end, { description = "Take sceenshot of are and Yank" })
|
||||
end, { description = "Take sceenshot of area and Yank" })
|
||||
|
||||
hl.bind("c", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot"))
|
||||
hl.dispatch(
|
||||
hl.dsp.exec_cmd(
|
||||
'grim -g "$(slurp -d)" - | satty -f - --copy-command wl-copy -o "~/Pictures/Screenshots/%Y-%m-%dT%H:%M:%SZ%z.png"'
|
||||
)
|
||||
)
|
||||
exit_submap()
|
||||
end, { description = "Take screenshot of area, yank and save" })
|
||||
|
||||
hl.bind("s", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-clipboard"))
|
||||
hl.dispatch(hl.dsp.exec_cmd("grim -g '$(slurp -d)' $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%dT%H:%M:%SZ%z.png')"))
|
||||
exit_submap()
|
||||
end, { description = "Take screenshot of area and Save" })
|
||||
|
||||
hl.bind("SHIFT + y", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-file"))
|
||||
hl.dispatch(hl.dsp.exec_cmd("grim - | wl-copy"))
|
||||
exit_submap()
|
||||
end, { description = "Take screenshot and Yank" })
|
||||
|
||||
hl.bind("SHIFT + c", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full"))
|
||||
hl.dispatch(
|
||||
hl.dsp.exec_cmd(
|
||||
'grim - | satty -f - --copy-command wl-copy -o "~/Pictures/Screenshots/%Y-%m-%dT%H:%M:%SZ%z.png"'
|
||||
)
|
||||
)
|
||||
exit_submap()
|
||||
end, { description = "Take sceenshot, yank and save" })
|
||||
|
||||
hl.bind("SHIFT + s", function()
|
||||
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-clipboard"))
|
||||
hl.dispatch(hl.dsp.exec_cmd("grim $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%dT%H:%M:%SZ%z.png')"))
|
||||
exit_submap()
|
||||
end, { description = "Take screenshot and Save" })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user