awesome: Add button to mute notifications to wibar

This commit is contained in:
Simon Bruder 2020-04-18 02:52:36 +00:00
parent c9a7a264df
commit c043e717c1
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
4 changed files with 17 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

View file

@ -207,6 +207,7 @@ awful.screen.connect_for_each_screen(function(s)
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(),
widgets.notifications,
widgets.tearstop,
widgets.redshift,
widgets.bluetooth,

View file

@ -188,6 +188,22 @@ widgets.tearstop:buttons(
)
)
widgets.notifications = wibox.widget.imagebox(iconsdir .. "notifications-on.png")
widgets.notifications:buttons(
gtable.join(
awful.button({ }, 1, function()
if naughty.is_suspended() then
naughty.resume()
widgets.notifications:set_image(iconsdir .. "notifications-on.png")
else
naughty.suspend()
widgets.notifications:set_image(iconsdir .. "notifications-off.png")
end
end)
)
)
widgets.cal = {}
widgets.cal.show = function()