awesome: Add button to mute notifications to wibar
This commit is contained in:
parent
c9a7a264df
commit
c043e717c1
BIN
home/.config/awesome/icons/notifications-off.png
Normal file
BIN
home/.config/awesome/icons/notifications-off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 B |
BIN
home/.config/awesome/icons/notifications-on.png
Normal file
BIN
home/.config/awesome/icons/notifications-on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 B |
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
Reference in a new issue