1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 14:05:11 +00:00
This commit is contained in:
Eric Blanchette 2014-05-16 08:27:37 +00:00
commit bc5123a360
2 changed files with 38 additions and 9 deletions

View file

@ -190,7 +190,7 @@ function parse_desktop_file(arg)
end
end
if program.Exec then
if program.Exec and program.Name then
local cmdline = program.Exec:gsub('%%c', program.Name)
cmdline = cmdline:gsub('%%[fmuFMU]', '')
cmdline = cmdline:gsub('%%k', program.file)

View file

@ -31,6 +31,7 @@ require("settings.variables")
iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all "
musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp "
yahoo_oid = "2972"
-- Tags and layouts
require("settings.tags")
@ -54,6 +55,15 @@ mytextclock = awful.widget.textclock(" %a %d %b %H:%M")
-- calendar
lain.widgets.calendar:attach(mytextclock, { font_size = 10 })
-- Weather
weathericon = wibox.widget.imagebox(beautiful.widget_weather)
yawn = lain.widgets.yawn(yahoo_oid, {
settings = function()
widget:set_markup(markup("#eca4c4", forecast:lower() .. " @ " .. units .. "°C"))
end
})
-- Mail IMAP check
mailicon = wibox.widget.imagebox(beautiful.widget_mail)
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
@ -110,6 +120,7 @@ memwidget = lain.widgets.mem({
cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
cpuwidget = wibox.widget.background(lain.widgets.cpu({
settings = function()
widget:set_text("" .. cpu_now.usage .. "%")
end
}), "#313131")
@ -134,7 +145,11 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131")
-- Battery
baticon = wibox.widget.imagebox(beautiful.widget_battery)
batwidget = lain.widgets.bat({
timeout=5,
settings = function()
if bat_now.perc == "N/A" then
widget:set_markup(" AC ")
baticon:set_image(beautiful.widget_ac)
@ -146,7 +161,12 @@ batwidget = lain.widgets.bat({
else
baticon:set_image(beautiful.widget_battery)
end
widget:set_markup(" " .. bat_now.perc .. "% ")
widget:set_markup(bat_now.perc .. "%")
--Fix for battery charging ;)
if bat_now.status == "Charging" or bat_now.status == "Unknown" then
baticon:set_image(beautiful.widget_ac)
end
end
})
@ -238,6 +258,15 @@ for s = 1, screen.count() do
right_layout:add(arrl_ld)
right_layout:add(mailicon)
--right_layout:add(mailwidget)
right_layout:add(arrl_dl)
right_layout:add(weathericon)
right_layout:add(yawn.widget)
right_layout:add(arrl_dl)
right_layout:add(weathericon)
right_layout:add(yawn.widget)
right_layout:add(arrl_dl)
right_layout:add(memicon)
right_layout:add(memwidget)