diff --git a/.conkyrc b/.conkyrc index 2203141..3972ed2 100644 --- a/.conkyrc +++ b/.conkyrc @@ -42,4 +42,5 @@ use_spacer none minimum_size 1268 0 TEXT -${alignc}Kernel: ${color D7D3C5}$kernel | ${color}Uptime: ${color D7D3C5}${uptime_short} | ${color }Down: ${color D7D3C5}${font}${downspeed eth0} Kb/s - ${color D7D3C5}${totaldown eth0} | ${color }Up: ${color D7D3C5}${upspeed eth0} Kb/s - ${color D7D3C5}${totalup eth0} | ${color }Root: ${color D7D3C5}${fs_free /} ${fs_bar 6,60 /} | ${color }Mem: ${color D7D3C5}$memperc% ${color D7D3C5} ${membar 6,80}${color D7D3C5} | ${color}Cpu: ${color D7D3C5}${cpu}% ${color D7D3C5}${cpugraph 9,80 AEA08E 9F907D} ${color D7D3C5} +${alignc}Kernel: ${color D7D3C5}$kernel | ${color}Uptime: ${color D7D3C5}${uptime_short} | ${color }Down: ${color D7D3C5}${font}${downspeed eth0} Kb/s - ${color D7D3C5}${totaldown eth0} | ${color }Up: ${color D7D3C5}${upspeed eth0} Kb/s - ${color D7D3C5}${totalup eth0} | ${color }Root: ${color D7D3C5}${fs_free /} ${fs_bar 6,60 /} | ${color} Temps: ${color D7D3C5} ${execi 300 /home/mathieu/config/scripts/weather.sh "EUR|FR|FR012|PARIS"} | ${color} Gmail : ${color D7D3C5} ${execi 300 python ~/config/scripts/gmail.py} +${alignc}${color light grey}${time %a %D %k:%M} | ${color }Mem: ${color D7D3C5}$memperc% ${color D7D3C5} ${membar 6,80}${color D7D3C5} | ${color}hog:${color D7D3C5} ${top_mem name 1}${offset -25}${top_mem mem 1}%${color grey} | ${color}Cpu: ${color D7D3C5}${cpu}% ${color D7D3C5}${cpugraph 9,80 AEA08E 9F907D} ${color D7D3C5} | ${color}hog:${color D7D3C5} ${top name 1}${offset -25}${top cpu 1}% | ${color}tempCpu:${color D7D3C5} $acpitemp | ${color}battery:$color ${color D7D3C5}${battery_bar 4,50 CMB0} #| ${color}Users:${color D7D3C5}${user_names} diff --git a/scripts/gmail.py b/scripts/gmail.py new file mode 100644 index 0000000..f0b6cf8 --- /dev/null +++ b/scripts/gmail.py @@ -0,0 +1,18 @@ +import os + +#Enter your username and password below within double quotes +# eg. username="username" and password="password" +username="" +password="" +com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate" + +temp=os.popen(com) +msg=temp.read() +index=msg.find("") +index2=msg.find("") +fc=int(msg[index+11:index2]) + +if fc==0: + print "0 new" +else: + print str(fc)+" new" diff --git a/scripts/weather.sh b/scripts/weather.sh new file mode 100755 index 0000000..829ee82 --- /dev/null +++ b/scripts/weather.sh @@ -0,0 +1,17 @@ +#!/bin/sh +#AccuWeather (r) RSS weather tool for conky +# +#USAGE: weather.sh +# +#(c) Michael Seiler 2007 + +METRIC=1 #Should be 0 or 1; 0 for F, 1 for C + +if [ -z $1 ]; then + echo + echo "USAGE: weather.sh " + echo + exit 0; +fi + +curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\Currently: (.*)?\<\/title\>/; print "$1"; }'