Added suspend / resume notifications shortcuts

This commit is contained in:
Thomas Forgione 2018-12-13 08:00:47 +01:00
parent d3ee45e4c9
commit 8182fa35d2
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 11 additions and 0 deletions

11
rc.lua
View File

@ -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