-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhanced naughty notifications from mcabbe.
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 == "[email protected]" 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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |