This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Expert's guide to configuring Conky

Posted by: Anonymous [ip:] on June 03, 2008 01:28 PM
here's what i put into my conkyrc to detect whether i'm using wired or wireless internet (or vpn). i imagine this could be cleaned up a bit, but it works quite well.

${if_empty ${exec cat /proc/net/arp | grep eth1}}${if_empty ${exec ps -e | grep pppd}}${alignc}${color white}wlan0: ${addr wlan0}$color
${alignc}${wireless_essid wlan0} (${wireless_ap wlan0})
${color 009900}${wireless_link_bar wlan0}$color
down: ${downspeed wlan0}k/s ${alignr}up: ${upspeed wlan0}k/s
total: ${totaldown wlan0} ${alignr} total: ${totalup wlan0}
${downspeedgraph wlan0 15,250 000000 000099} ${alignr}${upspeedgraph wlan0 15,250 000000 990000}
${else}${alignc}${color white}ppp0: ${addr ppp0}$color
down: ${downspeed ppp0}k/s ${alignr}up: ${upspeed ppp0}k/s
total: ${totaldown ppp0} ${alignr} total: ${totalup ppp0}
${downspeedgraph ppp0 15,250 000000 000099} ${alignr}${upspeedgraph ppp0 15,250 000000 990000}${endif}
${else}${alignc}${color white}eth1: ${addr eth1}$color
down: ${downspeed eth1}k/s ${alignr}up: ${upspeed eth1}k/s
total: ${totaldown eth1} ${alignr} total: ${totalup eth1}
${downspeedgraph eth1 15,250 000000 000099} ${alignr}${upspeedgraph eth1 15,250 000000 990000}


Return to Expert's guide to configuring Conky