[conky] Status bar update with gmail checker
This commit is contained in:
parent
48fadbacfa
commit
47735bba2b
3
.conkyrc
3
.conkyrc
@ -42,4 +42,5 @@ use_spacer none
|
|||||||
minimum_size 1268 0
|
minimum_size 1268 0
|
||||||
|
|
||||||
TEXT
|
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}
|
||||||
|
18
scripts/gmail.py
Normal file
18
scripts/gmail.py
Normal file
@ -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("<fullcount>")
|
||||||
|
index2=msg.find("</fullcount>")
|
||||||
|
fc=int(msg[index+11:index2])
|
||||||
|
|
||||||
|
if fc==0:
|
||||||
|
print "0 new"
|
||||||
|
else:
|
||||||
|
print str(fc)+" new"
|
17
scripts/weather.sh
Executable file
17
scripts/weather.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#AccuWeather (r) RSS weather tool for conky
|
||||||
|
#
|
||||||
|
#USAGE: weather.sh <locationcode>
|
||||||
|
#
|
||||||
|
#(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 <locationcode>"
|
||||||
|
echo
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'
|
Loading…
Reference in New Issue
Block a user