]>
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:
709a965 )
local calendar = {}
local notification = nil
local calendar = {}
local notification = nil
-local function create(background, fore ground)
+local function create(foreground, back ground)
calendar.offset = 0
calendar.icons_dir = icons_dir .. "cal/white/" -- default
calendar.notify_icon = nil
calendar.offset = 0
calendar.icons_dir = icons_dir .. "cal/white/" -- default
calendar.notify_icon = nil
-function calendar:attach(widget, background, fore ground)
- create(background, fore ground)
+function calendar:attach(widget, foreground, back ground)
+ create(foreground, back ground)
widget:connect_signal("mouse::enter", function () calendar:show() end)
widget:connect_signal("mouse::leave", function () calendar:hide() end)
widget:buttons(awful.util.table.join( awful.button({ }, 1, function ()
widget:connect_signal("mouse::enter", function () calendar:show() end)
widget:connect_signal("mouse::leave", function () calendar:hide() end)
widget:buttons(awful.util.table.join( awful.button({ }, 1, function ()
local header = args.header or " Cpu "
local header_color = args.header or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local header = args.header or " Cpu "
local header_color = args.header or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
- local footer = args.footer or "%"
+ local footer = args.footer or "% "
local w = wibox.widget.textbox()
local w = wibox.widget.textbox()
local dtotal = total - cpu.last_total
local dta = math.ceil((dactive / dtotal) * 100)
local dtotal = total - cpu.last_total
local dta = math.ceil((dactive / dtotal) * 100)
- w:set_markup(markup(header_color, header) .. markup(color, dta .. footer) .. " " )
+ w:set_markup(markup(header_color, header) .. markup(color, dta .. footer))
-- Save current data for the next run.
cpu.last_active = active
-- Save current data for the next run.
cpu.last_active = active
local header = args.header or " Hdd "
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
fs.color = args.color or beautiful.fg_focus or "#FFFFFF"
local header = args.header or " Hdd "
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
fs.color = args.color or beautiful.fg_focus or "#FFFFFF"
- local footer = args.footer or ""
+ local footer = args.footer or " "
local shadow = args.shadow or false
local myfs = wibox.widget.textbox()
local shadow = args.shadow or false
local myfs = wibox.widget.textbox()
local port = args.port or "993"
local refresh_timeout = args.refresh_timeout or 60
local port = args.port or "993"
local refresh_timeout = args.refresh_timeout or 60
- local header = args.header or " Mail "
+ local header = args.header or "Mail "
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local mail_encoding = args.mail_encoding or nil
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local mail_encoding = args.mail_encoding or nil
elseif ws:find("CheckMailError: invalid credentials") ~= nil
then
helpers.set_map(mail, true)
elseif ws:find("CheckMailError: invalid credentials") ~= nil
then
helpers.set_map(mail, true)
- myimapcheck:set_markup(markup(header_color, header) ..
+ myimapcheck:set_markup(" " .. markup(header_color, header) ..
markup(color, "invalid credentials "))
else
mailcount = ws:match("%d") or "?"
markup(color, "invalid credentials "))
else
mailcount = ws:match("%d") or "?"
helpers.set_map(mail .. " count", mailcount)
end
helpers.set_map(mail .. " count", mailcount)
end
- myimapcheck:set_markup(markup(header_color, header) ..
+ myimapcheck:set_markup(" " .. markup(header_color, header) ..
markup(color, mailcount) .. " ")
if helpers.get_map(mail)
markup(color, mailcount) .. " ")
if helpers.get_map(mail)
myimapcheck:set_markup(markup(color_nomail, " no mail "))
end
else
myimapcheck:set_markup(markup(color_nomail, " no mail "))
end
else
- myimapcheck:set_markup(markup(header_color, header) ..
+ myimapcheck:set_markup(" " .. markup(header_color, header) ..
markup(color_newmail, newmail) .. " ")
end
end
markup(color_newmail, newmail) .. " ")
end
end
local header = args.header or " Mem "
local header_color = args.header or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local header = args.header or " Mem "
local header_color = args.header or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
- local footer = args.footer or "MB"
+ local footer = args.footer or "MB "
local widg = wibox.widget.textbox()
local widg = wibox.widget.textbox()
then
local fmt = "%" .. string.len(mem.total) .. ".0f/%.0f"
widg:set_markup(markup(header_color, header) ..
then
local fmt = "%" .. string.len(mem.total) .. ".0f/%.0f"
widg:set_markup(markup(header_color, header) ..
- markup(color, string.format(fmt, used, mem.total) .. footer .. " " ))
+ markup(color, string.format(fmt, used, mem.total) .. footer))
else
widg:set_markup(markup(header_color, header) ..
else
widg:set_markup(markup(header_color, header) ..
- markup(color, used .. footer .. " " ))
+ markup(color, used .. footer))
end
if show_swap
then
widg:set_markup(widg._layout.text .. ' ('
.. string.format('%.0f '.. footer, swapused)
end
if show_swap
then
widg:set_markup(widg._layout.text .. ' ('
.. string.format('%.0f '.. footer, swapused)
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local spr = args.spr or " "
local header_color = args.header_color or beautiful.fg_normal or "#FFFFFF"
local color = args.color or beautiful.fg_focus or "#FFFFFF"
local spr = args.spr or " "
+ local footer = args.footer or ""
local app = args.app or "ncmpcpp"
local shadow = args.shadow or false
local app = args.app or "ncmpcpp"
local shadow = args.shadow or false
then
mympd:set_text('')
else
then
mympd:set_text('')
else
- mympd:set_markup(markup(header_color, " mpd "), markup(color , "off ") )
+ mympd:set_markup(markup(header_color, "mpd ") .. markup(color , "off") .. footer )
replaces_id = mpd.id
}).id
end
replaces_id = mpd.id
}).id
end
- mympd:set_markup(markup(header_color, " " .. mpd_state["{Artist}"])
+ mympd:set_markup(markup(header_color, mpd_state["{Artist}"])
- markup(color, mpd_state["{Title}"] .. " ") )
+ markup(color, mpd_state["{Title}"]) .. footer )
elseif mpd_state["{state}"] == "pause"
then
elseif mpd_state["{state}"] == "pause"
then
- mympd:set_markup(markup(header_color, " mpd")
+ mympd:set_markup(markup(header_color, "mpd")
- markup(color, "paused ") )
+ markup(color, "paused") .. footer )
else
helpers.set_map("current mpd track", nil)
set_nompd()
else
helpers.set_map("current mpd track", nil)
set_nompd()