Quoting Daniel <[email protected]> (Sat, 15 Dec 2012, 09:48:06):
> Is there any way to zap, remove, all currently displayed notifications? From
> a key binding in awesome--like "Fine, I have read all of them, just be gone".

Found some snippets on the net e.g.:
 URL: http://wwwcip.cs.fau.de/~re06huxa/closenaughty.lua

This is from my rc.lua (little changes, + close all notifications):

-- destroy notifications by keys {{{
function closeLastNaughtyMsg()
   screen = 1 -- FIXME screen.count
   for p,pos in pairs(naughty.notifications[screen]) do
       for i,n in pairs(naughty.notifications[screen][p]) do
           naughty.destroy(n)
           return true
       end
   end
   return false
end

function closeAllNaughtyMsg()
    n = closeLastNaughtyMsg()
    while n do
        n = closeLastNaughtyMsg()
    end
end
-- }}}

and in global keys:

  awful.key({ modkey,           }, "F9", closeLastNaughtyMsg,
  awful.key({ modkey,           }, "F10", closeAllNaughtyMsg,

or, using keydoc:

  awful.key({ modkey,           }, "F9", closeLastNaughtyMsg, "Close last 
Naughty msg"),
  awful.key({ modkey,           }, "F10", closeAllNaughtyMsg, "Close all  
Naughty msgs"),

HTH
Juergen

-- 
To unsubscribe, send mail to [email protected].

Reply via email to