diff options
| author | Kyle Javier | 2021-09-24 00:14:39 -0400 |
|---|---|---|
| committer | Kyle Javier | 2021-09-24 00:14:39 -0400 |
| commit | 0c04f4a8f298db68b51d72bffa4a7c721a5496eb (patch) | |
| tree | 26505425b4b76a61d67480b375f560fe8bdb80c7 | |
| parent | 6d5c197025f7327ba4a6694d8b9c13e36b9938b6 (diff) | |
added proper (hopefully) suspend/resume notifications for the naughty daemon
| -rw-r--r-- | awesome/rc.lua | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua index 24b447f..cc159f2 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -28,7 +28,7 @@ if awesome.startup_errors then end -- Handle runtime errors after startup -do +--[[do local in_error = false awesome.connect_signal("debug::error", function (err) -- Make sure we don't go into an endless error loop @@ -40,7 +40,22 @@ do text = tostring(err) }) in_error = false end) +end]]-- + +-- Faux notifications to make suspend/resume of notifications look normal + +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ title = "Notifications Resumed: All indexed notifications have been destroyed", message = "All indexed notifications have been destroyed", timeout = 1 }) + in_error = false + end) end + -- }}} -- {{{ Variable definitions @@ -266,8 +281,8 @@ globalkeys = gears.table.join( -- Notification Manipulation awful.key({ modkey, }, "n", function () naughty.suspend() end, {description = "Suspend Notifications", group = "awesome"}), - awful.key({ modkey, }, "m", function () naughty.resume() naughty.destroy_all_notifications() end, - {description = "Resume Notifications", group = "awesome"}), + awful.key({ modkey, }, "m", function () naughty.toggle() naughty.resume() end, + {description = "Resume Notifications", group = "awesome"}), -- Unmodified Keys - Kyle |
