Created
January 27, 2015 23:55
-
-
Save andreasjansson/23121e79100c86852342 to your computer and use it in GitHub Desktop.
Conky toolbar
This file contains hidden or 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
function conky_format(format, number) | |
return string.format(format, conky_parse(number)) | |
end | |
function conky_average(...) | |
local sum = 0 | |
local count = 0 | |
for _, v in ipairs({...}) do | |
sum = sum + conky_parse(v) | |
count = count + 1 | |
end | |
return (sum / count) | |
end |
This file contains hidden or 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
out_to_console yes | |
out_to_x no | |
background no | |
update_interval 1 | |
total_run_times 0 | |
use_spacer left | |
short_units | |
no_buffers yes | |
cpu_avg_samples 1 | |
lua_load ~/.conky_lua_scripts.lua | |
TEXT | |
cpu ${lua_parse format %3.0f ${cpu cpu1}}% \ | |
${lua_parse format %3.0f ${cpu cpu2}}% \ | |
${lua_parse format %3.0f ${cpu cpu3}}% \ | |
${lua_parse format %3.0f ${cpu cpu4}}% \ | |
${lua_parse format %3.0f ${cpu cpu5}}% \ | |
${lua_parse format %3.0f ${cpu cpu6}}% \ | |
${lua_parse format %3.0f ${cpu cpu7}}% \ | |
${lua_parse format %3.0f ${cpu cpu8}}% | \ | |
freq ${lua_parse format %4.0f ${lua_parse average ${freq 1} ${freq 2} ${freq 3} ${freq 4} ${freq 5} ${freq 6} ${freq 7} ${freq 8}}}MHz | \ | |
load ${loadavg 1} | \ | |
mem $mem | \ | |
swap $swap | \ | |
disk ${diskio_read} ${diskio_write} | \ | |
${if_existing /proc/net/route wlan1}\ | |
wlan1 ${wireless_essid wlan1} ${downspeed wlan1} ${upspeed wlan1} | \ | |
${endif}\ | |
${if_existing /proc/net/route wlan0}\ | |
wlan0 ${wireless_essid wlan0} ${downspeed wlan0} ${upspeed wlan0} | \ | |
${endif}\ | |
${if_existing /proc/net/route eth0}\ | |
eth0 ${downspeed eth0} ${upspeed eth0} | \ | |
${endif}\ | |
${battery} | \ | |
temp ${acpitemp}C | \ | |
weather ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KNYC temperature}C | \ | |
vol ${exec amixer -M get Master | grep Mono: | awk '{ if ($6 == "[off]") { print "mute" } else { gsub(/[\[\]]/, "", $4); print sprintf("%4s", $4) } }'} | \ | |
${time %Y-%m-%d %H:%M} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment