summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-12-11 03:00:39 +0100
committerache <ache@ache.one>2023-12-11 03:00:39 +0100
commit341d63f2a52d1115653dafb703cb35c649717572 (patch)
tree6362d14e5a9cefdca64478d7b6aa28165d1c879e
parentFrom scrot to maim (diff)
Use clip2file instead of bash crypticHEADmaster
-rw-r--r--rc.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/rc.lua b/rc.lua
index de12742..71be253 100644
--- a/rc.lua
+++ b/rc.lua
@@ -794,8 +794,15 @@ awful.key({ modkey, "Mod1" }, "#43", hotkeys_popup.show_help, {descripti
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 })
+ awful.spawn.easy_async("clip2file",
+ function(res, stderr, reason, exit_code)
+ if exit_code == 0 then
+ naughty.notify({title='Maim', text='Clipboard saved !', timeout=3})
+ else
+ naughty.notify({preset=naughty.config.presets.critical, title='Maim', text=stderr, timeout=3 })
+ end
+ end
+ )
end,
{description = "Save clipboard to file", group = "awesome"}),
awful.key({ modkey, "Shift"}, "#39", function ()