]>
git.madduck.net Git - etc/awesome.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
0f5ce4d )
function alsabar.notify()
alsabar.update()
function alsabar.notify()
alsabar.update()
title = "",
text = "",
timeout = 4,
font = alsabar.notifications.font .. " " ..
alsabar.notifications.font_size,
fg = alsabar.notifications.color
title = "",
text = "",
timeout = 4,
font = alsabar.notifications.font .. " " ..
alsabar.notifications.font_size,
fg = alsabar.notifications.color
- preset.title = alsabar.channel .. " - Muted"
- else
- preset.title = alsabar.channel .. " - " .. alsabar._current_level * 100 .. "%"
- end
+ preset.title = alsabar.channel .. " - Muted"
+ else
+ preset.title = alsabar.channel .. " - " .. alsabar._current_level * 100 .. "%"
+ end
int = math.modf(alsabar._current_level * alsabar.notifications.bar_size)
preset.text = "["
int = math.modf(alsabar._current_level * alsabar.notifications.bar_size)
preset.text = "["
.. "]"
if alsabar._notify ~= nil then
.. "]"
if alsabar._notify ~= nil then
- alsabar._notify = naughty.notify ({
+ alsabar._notify = naughty.notify ({
replaces_id = alsabar._notify.id,
replaces_id = alsabar._notify.id,
+ preset = preset,
+ screen = client.focus and client.focus.screen or 1
- else
- alsabar._notify = naughty.notify ({
- preset = preset
+ else
+ alsabar._notify = naughty.notify ({
+ preset = preset,
+ screen = client.focus and client.focus.screen or 1
end
local function worker(args)
end
local function worker(args)
then
bat.id = naughty.notify({
preset = bat_notification_critical_preset,
then
bat.id = naughty.notify({
preset = bat_notification_critical_preset,
+ replaces_id = bat.id,
+ screen = client.focus and client.focus.screen or 1
}).id
elseif nperc <= 15
then
bat.id = naughty.notify({
preset = bat_notification_low_preset,
}).id
elseif nperc <= 15
then
bat.id = naughty.notify({
preset = bat_notification_low_preset,
+ replaces_id = bat.id,
+ screen = client.focus and client.focus.screen or 1
position = calendar.position,
fg = calendar.fg,
bg = calendar.bg,
position = calendar.position,
fg = calendar.fg,
bg = calendar.bg,
+ timeout = tims,
+ screen = client.focus and client.focus.screen or 1
position = task.position,
fg = task.fg,
bg = task.bg,
position = task.position,
fg = task.fg,
bg = task.bg,
- timeout = task.timeout })
+ timeout = task.timeout,
+ screen = client.focus and client.focus.screen or 1
+ })
end
function task:prompt_add()
end
function task:prompt_add()
position = task.position,
fg = task.fg,
bg = task.bg,
position = task.position,
fg = task.fg,
bg = task.bg,
+ timeout = task.timeout,
+ screen = client.focus and client.focus.screen or 1
position = task.position,
fg = task.fg,
bg = task.bg,
position = task.position,
fg = task.fg,
bg = task.bg,
+ timeout = task.timeout,
+ screen = client.focus and client.focus.screen or 1
tpbat_notification = naughty.notify({
preset = { fg = beautiful.fg_normal },
text = str,
tpbat_notification = naughty.notify({
preset = { fg = beautiful.fg_normal },
text = str,
+ timeout = t_out,
+ screen = client.focus and client.focus.screen or 1
local n = naughty.notify({
preset = bat_notification_low_preset,
title = "SMAPI Battery Warning: Unable to read battery state!",
local n = naughty.notify({
preset = bat_notification_low_preset,
title = "SMAPI Battery Warning: Unable to read battery state!",
- text = "This widget is intended for ThinkPads. Is tp_smapi installed? Check your configs & paths."
+ text = "This widget is intended for ThinkPads. Is tp_smapi installed? Check your configs & paths.",
+ screen = client.focus and client.focus.screen or 1
then
tpbat.id = naughty.notify({
preset = bat_notification_critical_preset,
then
tpbat.id = naughty.notify({
preset = bat_notification_critical_preset,
+ replaces_id = tpbat.id,
+ screen = client.focus and client.focus.screen or 1
}).id
elseif bat_now.perc <= 15
then
tpbat.id = naughty.notify({
preset = bat_notification_low_preset,
}).id
elseif bat_now.perc <= 15
then
tpbat.id = naughty.notify({
preset = bat_notification_low_preset,
+ replaces_id = tpbat.id,
+ screen = client.focus and client.focus.screen or 1
notification = naughty.notify({
preset = fs_notification_preset,
text = ws,
notification = naughty.notify({
preset = fs_notification_preset,
text = ws,
+ timeout = t_out,
+ screen = client.focus and client.focus.screen or 1
function update()
fs_info = {}
fs_now = {}
function update()
fs_info = {}
fs_now = {}
local f = io.popen("LC_ALL=C df -kP " .. partition)
for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount)
local f = io.popen("LC_ALL=C df -kP " .. partition)
for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount)
text = partition .. " ran out!\nmake some room",
timeout = 8,
fg = "#000000",
text = partition .. " ran out!\nmake some room",
timeout = 8,
fg = "#000000",
+ bg = "#FFFFFF",
+ screen = client.focus and client.focus.screen or 1
})
helpers.set_map("fs", true)
else
})
helpers.set_map("fs", true)
else
else
nt = mail .. " has <b>" .. mailcount .. "</b> new messages"
end
else
nt = mail .. " has <b>" .. mailcount .. "</b> new messages"
end
- naughty.notify({ preset = mail_notification_preset, text = nt })
+ naughty.notify({
+ preset = mail_notification_preset,
+ text = nt,
+ screen = client.focus and client.focus.screen or 1
+ })
end
helpers.set_map(mail, mailcount)
end
helpers.set_map(mail, mailcount)
mpd.id = naughty.notify({
preset = mpd_notification_preset,
icon = "/tmp/mpdcover.png",
mpd.id = naughty.notify({
preset = mpd_notification_preset,
icon = "/tmp/mpdcover.png",
+ replaces_id = mpd.id,
+ screen = client.focus and client.focus.screen or 1
}).id
end
elseif mpd_now.state ~= "pause"
}).id
end
elseif mpd_now.state ~= "pause"
timeout = 7,
position = "top_left",
icon = helpers.icons_dir .. "no_net.png",
timeout = 7,
position = "top_left",
icon = helpers.icons_dir .. "no_net.png",
- fg = notify_fg or "#FFFFFF"
+ fg = notify_fg or "#FFFFFF",
+ screen = client.focus and client.focus.screen or 1
})
helpers.set_map(iface, false)
end
})
helpers.set_map(iface, false)
end
preset = yawn_notification_preset,
text = weather_data,
icon = sky,
preset = yawn_notification_preset,
text = weather_data,
icon = sky,
+ timeout = t_out,
+ screen = client.focus and client.focus.screen or 1