From 8182fa35d2009b30ce77779d3a77404969b2d8bb Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 13 Dec 2018 08:00:47 +0100 Subject: [PATCH] Added suspend / resume notifications shortcuts --- rc.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rc.lua b/rc.lua index 32c5a2b..ba948df 100644 --- a/rc.lua +++ b/rc.lua @@ -23,6 +23,7 @@ local email_widget = require("awesome-wm-widgets.email-widget.email") -- Custom imports local options = require("options") home = os.getenv('HOME') +local naughty_suspended = false os.execute('xset m 16/1 0') os.setlocale("fr_FR.UTF-8") @@ -501,6 +502,16 @@ globalkeys = awful.util.table.join( naughty.notify({title = "Starting social media"}) end, {description="Open social media", group="shortcuts"}), + awful.key({modkey}, "d", function() + if naughty_suspended then + naughty.resume() + naughty_suspended = false + else + naughty.suspend() + naughty_suspended = true + end + end, {description="Suspend / Resume notifications", group="shortcuts"}), + awful.key({modkey, "Shift"}, "m", function() awful.spawn.easy_async('sleep 0.5', function() for i = 1, #options.email do