awesomewm/modules/screenshot/init.lua

67 lines
1.1 KiB
Lua
Raw Normal View History

2022-08-01 15:00:16 -07:00
local function screenshot_action(mode)
2022-08-03 07:41:41 -07:00
awful.spawn(
2023-10-10 11:14:56 -07:00
"fish " .. conf_dir .. "modules/screenshot/screenshot.fish " .. mode,
2022-08-03 07:41:41 -07:00
false
)
2022-07-16 17:41:00 -07:00
end
return {
keybinds = gears.table.join(
awful.key( {}, "Print",
function ()
2022-08-01 15:00:16 -07:00
screenshot_action("normal")
2022-07-16 17:41:00 -07:00
end,
{
description = "Take a screenshot",
2022-08-01 15:00:16 -07:00
group = "Screenshot"
}
),
2022-08-02 16:43:28 -07:00
awful.key( {"Control", "Shift"}, "Print",
2022-08-01 15:00:16 -07:00
function ()
2022-08-02 16:43:28 -07:00
screenshot_action("ocr-rus")
2022-08-01 15:00:16 -07:00
end,
{
2022-08-02 16:43:28 -07:00
description = "OCR Capture (Russian)",
2022-08-01 15:00:16 -07:00
group = "Screenshot"
}
),
2022-08-02 16:43:28 -07:00
awful.key( {"Control"}, "Print",
2022-08-03 07:41:41 -07:00
function ()
screenshot_action("ocr-eng")
end,
2022-08-02 16:43:28 -07:00
2022-08-03 07:41:41 -07:00
{
description = "OCR Capture (English)",
group = "Screenshot"
}
),
2022-08-02 16:43:28 -07:00
2022-08-01 15:00:16 -07:00
awful.key( {"Shift"}, "Print",
function ()
screenshot_action("pin")
end,
{
description = "Pin a screenshot",
group = "Screenshot"
2022-07-16 17:41:00 -07:00
}
2022-08-03 07:41:41 -07:00
),
2022-08-02 19:36:59 -07:00
2022-08-03 07:41:41 -07:00
awful.key( {"Mod1"}, "Print",
function ()
-- Make sure your default printer is set in CUPS!
screenshot_action("lpr")
end,
{
description = "Print a screenshot",
group = "Screenshot"
}
)
2022-07-16 17:41:00 -07:00
)
}