diff options
Diffstat (limited to 'rc.lua')
-rw-r--r-- | rc.lua | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 () |