summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-06-23 07:02:34 +0200
committerache <ache@ache.one>2019-06-23 07:02:34 +0200
commit0e00351b3a8d0120a8eebf55c4dbeb88c27eb91e (patch)
tree02a3b76d08df29ec034aed9d9a37bf26e38021f4
parentKill session (diff)
Toggle email notification
-rw-r--r--rc.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/rc.lua b/rc.lua
index 6d58ff6..04439e0 100644
--- a/rc.lua
+++ b/rc.lua
@@ -205,11 +205,12 @@ mybatwidget = wibox.widget.textbox ('')
mynetworkwidget = wibox.widget.textbox ('')
notify_bat = true
+notify_email = true
local lastIp = ''
local lastInt = ''
-function act()
+function act()
vicious.force({ mpdwidget, })
--{{ Batterie notification
awful.spawn.easy_async("bash -c \"acpi | cut -d' ' -f3 \"",
@@ -321,7 +322,7 @@ function act()
awful.spawn.easy_async(
"bash -c \"which hasMail > /dev/null 2>&1 && hasMail\"",
function(res, stderr, reason, exit_code)
- if res == "0\n" then
+ if res == "0\n" or notify_email == false then
myemailwidget:set_text ( "" )
elseif res == "" then
myemailwidget:set_text ( "☠" )
@@ -674,6 +675,13 @@ awful.key({ modkey, "Shift" }, "s", hotkeys_popup.show_help, {descriptio
end,
{description = "Toggle battery warning", group = "awesome"}),
+ awful.key({ modkey, "Shift" }, "e", function ()
+ notify_email = not notify_email
+ naughty.notify({ preset = naughty.config.presets.normal, timeout=1,
+ text = "Notification d'email : " .. ( notify_email and "activée" or "désactivée" )})
+
+ end,
+ {description = "Toggle email warning", group = "awesome"}),
awful.key({ modkey, "Control" }, "t", showHideWibox),