40 lines
712 B
Lua
40 lines
712 B
Lua
|
|
||
|
local script = conf_dir .. "modules/screenshot/screenshot.fish"
|
||
|
script = script .. " "
|
||
|
|
||
|
local function capture(source, target)
|
||
|
awful.spawn(script .. "capture " .. source .. " " .. target, false)
|
||
|
end
|
||
|
|
||
|
local function flameshot()
|
||
|
--awful.spawn("flameshot gui -p \"" .. conf.screenshot_dir .. "\"", false)
|
||
|
awful.spawn("flameshot gui", false)
|
||
|
end
|
||
|
|
||
|
|
||
|
return {
|
||
|
keybinds = gears.table.join(
|
||
|
awful.key( {"Control"}, "Print",
|
||
|
function ()
|
||
|
capture("region", "ocr")
|
||
|
end,
|
||
|
|
||
|
{
|
||
|
description = "OCR a region to the clipboard",
|
||
|
group = "Desktop"
|
||
|
}
|
||
|
),
|
||
|
|
||
|
awful.key( {}, "Print",
|
||
|
function ()
|
||
|
flameshot()
|
||
|
end,
|
||
|
|
||
|
{
|
||
|
description = "Take a screenshot",
|
||
|
group = "Desktop"
|
||
|
}
|
||
|
)
|
||
|
)
|
||
|
}
|