2022-07-16 17:41:00 -07:00
|
|
|
|
|
|
|
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()
|
2022-07-16 19:06:55 -07:00
|
|
|
awful.spawn("flameshot gui -p \"" .. config.screenshot.save_dir .. "\"", false)
|
2022-07-16 17:41:00 -07:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|