Files
dotfiles/config/hypr/hyprland/binds/screenshot.lua
T

40 lines
1.2 KiB
Lua

local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("screenshot", function()
hl.bind("y", function()
hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-file"))
exit_submap()
end, { description = "Take sceenshot of are and Yank" })
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("dms screenshot"))
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"))
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"))
exit_submap()
end, { description = "Take screenshot and Yank" })
hl.bind("SHIFT + c", function()
hl.dispatch(hl.dsp.exec_cmd("dms screenshot full"))
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"))
exit_submap()
end, { description = "Take screenshot and Save" })
hl.bind("Escape", function()
exit_submap()
end)
end)