Added function to check state of notifications

Sometimes is a good idea to check if notifications are suspended,
for example, for changing the icon. This function just returns the value
of suspended.

Closes https://github.com/awesomeWM/awesome/pull/222.
This commit is contained in:
Alex Kir 2015-05-13 11:36:05 +08:00 committed by Daniel Hahler
parent bafa12ca24
commit 82e62a0fad
1 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,11 @@ for s = 1, capi.screen.count() do
} }
end end
--- Notification state
function naughty.is_suspended()
return suspended
end
--- Suspend notifications --- Suspend notifications
function naughty.suspend() function naughty.suspend()
suspended = true suspended = true