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
end end
if program.Exec then if program.Exec and program.Name then
local cmdline = program.Exec:gsub('%%c', program.Name) local cmdline = program.Exec:gsub('%%c', program.Name)
cmdline = cmdline:gsub('%%[fmuFMU]', '') cmdline = cmdline:gsub('%%[fmuFMU]', '')
cmdline = cmdline:gsub('%%k', program.file) 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 " iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all "
musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp "
yahoo_oid = "2972"
-- Tags and layouts -- Tags and layouts
require("settings.tags") require("settings.tags")
@ -54,6 +55,15 @@ mytextclock = awful.widget.textclock(" %a %d %b %H:%M")
-- calendar -- calendar
lain.widgets.calendar:attach(mytextclock, { font_size = 10 }) 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 -- Mail IMAP check
mailicon = wibox.widget.imagebox(beautiful.widget_mail) mailicon = wibox.widget.imagebox(beautiful.widget_mail)
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end))) mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
@ -102,7 +112,7 @@ mpdwidgetbg = wibox.widget.background(mpdwidget, "#313131")
memicon = wibox.widget.imagebox(beautiful.widget_mem) memicon = wibox.widget.imagebox(beautiful.widget_mem)
memwidget = lain.widgets.mem({ memwidget = lain.widgets.mem({
settings = function() settings = function()
widget:set_text(" " .. mem_now.used .. "MB ") widget:set_text("" .. mem_now.used .. "MB")
end end
}) })
@ -110,7 +120,8 @@ memwidget = lain.widgets.mem({
cpuicon = wibox.widget.imagebox(beautiful.widget_cpu) cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
cpuwidget = wibox.widget.background(lain.widgets.cpu({ cpuwidget = wibox.widget.background(lain.widgets.cpu({
settings = function() settings = function()
widget:set_text(" " .. cpu_now.usage .. "% ")
widget:set_text("" .. cpu_now.usage .. "%")
end end
}), "#313131") }), "#313131")
@ -118,7 +129,7 @@ cpuwidget = wibox.widget.background(lain.widgets.cpu({
tempicon = wibox.widget.imagebox(beautiful.widget_temp) tempicon = wibox.widget.imagebox(beautiful.widget_temp)
tempwidget = lain.widgets.temp({ tempwidget = lain.widgets.temp({
settings = function() settings = function()
widget:set_text(" " .. coretemp_now .. "°C ") widget:set_text("" .. coretemp_now .. "°C")
end end
}) })
@ -126,7 +137,7 @@ tempwidget = lain.widgets.temp({
fsicon = wibox.widget.imagebox(beautiful.widget_hdd) fsicon = wibox.widget.imagebox(beautiful.widget_hdd)
fswidget = lain.widgets.fs({ fswidget = lain.widgets.fs({
settings = function() settings = function()
widget:set_text(" " .. fs_now.used .. "% ") widget:set_text("" .. fs_now.used .. "%")
end end
}) })
fswidgetbg = wibox.widget.background(fswidget, "#313131") fswidgetbg = wibox.widget.background(fswidget, "#313131")
@ -134,7 +145,11 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131")
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.widget_battery) baticon = wibox.widget.imagebox(beautiful.widget_battery)
batwidget = lain.widgets.bat({ batwidget = lain.widgets.bat({
timeout=5,
settings = function() settings = function()
if bat_now.perc == "N/A" then if bat_now.perc == "N/A" then
widget:set_markup(" AC ") widget:set_markup(" AC ")
baticon:set_image(beautiful.widget_ac) baticon:set_image(beautiful.widget_ac)
@ -146,7 +161,12 @@ batwidget = lain.widgets.bat({
else else
baticon:set_image(beautiful.widget_battery) baticon:set_image(beautiful.widget_battery)
end 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 end
}) })
@ -164,7 +184,7 @@ volumewidget = lain.widgets.alsa({
volicon:set_image(beautiful.widget_vol) volicon:set_image(beautiful.widget_vol)
end end
widget:set_text(" " .. volume_now.level .. "% ") widget:set_text("" .. volume_now.level .. "%")
end end
}) })
@ -173,9 +193,9 @@ neticon = wibox.widget.imagebox(beautiful.widget_net)
neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end))) neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end)))
netwidget = wibox.widget.background(lain.widgets.net({ netwidget = wibox.widget.background(lain.widgets.net({
settings = function() settings = function()
widget:set_markup(markup("#7AC82E", " " .. net_now.received) widget:set_markup(markup("#7AC82E", "" .. net_now.received)
.. " " .. .. " " ..
markup("#46A8C3", " " .. net_now.sent .. " ")) markup("#46A8C3", "" .. net_now.sent .. ""))
end end
}), "#313131") }), "#313131")
@ -238,6 +258,15 @@ for s = 1, screen.count() do
right_layout:add(arrl_ld) right_layout:add(arrl_ld)
right_layout:add(mailicon) right_layout:add(mailicon)
--right_layout:add(mailwidget) --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(arrl_dl)
right_layout:add(memicon) right_layout:add(memicon)
right_layout:add(memwidget) right_layout:add(memwidget)