diff --git a/rc/im.lua b/rc/im.lua index 37cedcd..b3e2f30 100644 --- a/rc/im.lua +++ b/rc/im.lua @@ -1,5 +1,6 @@ muc_nick = "chriss" +-- IM settings naughty.config.presets.online = { bg = "#1f880e80", fg = "#ffffff", @@ -42,11 +43,19 @@ function mcabber_event_hook(kind, direction, jid, msg) if direction == "MUC" and txt:match("^<" .. muc_nick .. ">") then return end + + if jid == "nagios@dailymotion.com" and string.match(mesg, "^PROBLEM:") then + preset = naughty.config.presets.critical + else + preset = naughty.config.presets.normal + end + naughty.notify{ icon = "chat_msg_recv", text = awful.util.escape(txt), title = jid, - timeout = 30 + timeout = 30, + preset = preset } end -- Disabled connect/disconnect notifications. diff --git a/rc/naughty.lua b/rc/naughty.lua index 84f0b8a..f748a16 100644 --- a/rc/naughty.lua +++ b/rc/naughty.lua @@ -1,6 +1,10 @@ -- Naughty configuration -naughty.config.defaults = { timeout = 45 } +naughty.config.default_preset = { + timeout = 45, + margin = 4, + gap = 1, +} naughty.config.icon_dirs = { os.getenv("HOME") .. "/.config/awesome/icons/im/", "/usr/share/pixmaps/" } -- vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4