summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-12-09 11:14:09 +0100
committerache <ache@ache.one>2023-12-09 11:14:09 +0100
commit2ccf1c2e28377d5a5f6deb906713b52f9c8a0f0d (patch)
treef6ad11d593e9cee1f5c94cf27a67892674d8db20
parentSwitch to caja (diff)
From scrot to maim
-rw-r--r--rc.lua24
1 files changed, 16 insertions, 8 deletions
diff --git a/rc.lua b/rc.lua
index 9cd2a3f..de12742 100644
--- a/rc.lua
+++ b/rc.lua
@@ -784,22 +784,30 @@ awful.key({ modkey, "Mod1" }, "#43", hotkeys_popup.show_help, {descripti
{description = "Ranger", group = "awesome"}),
awful.key({ modkey, "Control"}, "#27", function () awful.util.spawn("caja") end),
awful.key({ modkey, }, "#39", function ()
- awful.util.spawn("scrot")
- naughty.notify({ title = 'Scrot', text = 'New screenshot taken', timeout = 3 })
+ awful.util.spawn("bash -c \"maim -u | xclip -selection clipboard -t image/png\"")
+ naughty.notify({ title = 'Maim', text = 'New screenshot taken', timeout = 3 })
end,
{description = "Screenshot", group = "awesome"}),
+ awful.key({ modkey, "Shift" }, "#54", function ()
+ awful.util.spawn("xsel -x")
+ naughty.notify({ title = 'Maim', text = 'New screenshot taken', timeout = 3 })
+ end,
+ {description = "Switch PRIMARY and SECONDARY clipboard", group = "awesome"}),
+ awful.key({ modkey, "Control" }, "#54", function ()
+ awful.util.spawn("bash -c \"xclip -o -selection clipboard -t image/png > ~/$(date '+%Y-%m-%dT%T').png\"")
+ naughty.notify({ title = 'Maim', text = 'Clipboard saved !', timeout = 3 })
+ end,
+ {description = "Save clipboard to file", group = "awesome"}),
awful.key({ modkey, "Shift"}, "#39", function ()
- awful.util.spawn("scrot -s")
- naughty.notify({ title = 'Scrot', text = 'New screenshot taken', timeout = 3 })
+ awful.util.spawn("bash -c \"maim -u -s | xclip -selection clipboard -t image/png\"")
+ naughty.notify({ title = 'Maim', text = 'New screenshot taken', timeout = 3 })
end,
{description = "Screenshot of selectionned area", group = "awesome"}),
awful.key({ modkey, "Control" }, "#39", function ()
- awful.util.spawn("scrot -u")
- naughty.notify({ title = 'Scrot', text = 'Screenshot of focused windows', timeout = 2 })
+ awful.util.spawn("bash -c \"maim -u -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png\"")
+ naughty.notify({ title = 'Maim', text = 'Screenshot of focused windows', timeout = 2 })
end,
{description = "Screenshot of focused windows", group = "awesome"}),
-
-
awful.key({ modkey, }, "#113",
function ()
local screen = awful.screen.focused()