diff --git a/home/.config/awesome/icons/notifications-off.png b/home/.config/awesome/icons/notifications-off.png new file mode 100644 index 0000000..8a32ec4 Binary files /dev/null and b/home/.config/awesome/icons/notifications-off.png differ diff --git a/home/.config/awesome/icons/notifications-on.png b/home/.config/awesome/icons/notifications-on.png new file mode 100644 index 0000000..409ce5c Binary files /dev/null and b/home/.config/awesome/icons/notifications-on.png differ diff --git a/home/.config/awesome/rc.lua b/home/.config/awesome/rc.lua index 1651c96..4912316 100644 --- a/home/.config/awesome/rc.lua +++ b/home/.config/awesome/rc.lua @@ -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, diff --git a/home/.config/awesome/widgets.lua b/home/.config/awesome/widgets.lua index b50f673..e915399 100644 --- a/home/.config/awesome/widgets.lua +++ b/home/.config/awesome/widgets.lua @@ -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()