Hi,
I can't get the gmail.py script to work in my conky.
Here is .conkyrc:
Code:
# maintain spacing between certain elements
use_spacer yes
# set to yes if you want tormo to be forked in the background
#background yes
use_xft yes
# Xft font when Xft is enabled
xftfont Vera-7
#xftfont Andale Mono-9
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=8
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10
# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL
# Update interval in seconds
update_interval 1.0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 200 5
maximum_width 300
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no # amplifies text
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 3
# border margins
border_margin 5
# border widt5
border_width 6
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey90
default_shade_color black
default_outline_color DarkGrey
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 24
gap_y 24
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# stuff after 'TEXT' will be formatted on screen
TEXT
${color #ffcb48}System ${hr 2}
${color #e5e5e5}Ubuntu $sysname $kernel on $nodename
${color #e5e5e5}Uptime $alignr $uptime
${color #e5e5e5}Cpu $color $alignr $cpu%
${color #e5e5e5}Load $alignr $loadavg
${color #e5e5e5}Ram $color $memperc% ${color #98c2c7}${membar 6}${color #98c2c7}
${color #e5e5e5}Swap $color $swapperc% ${color #98c2c7}${swapbar 6}${color #98c2c7}
${color #e5e5e5}Processes $color $processes Running$color $running_processes
${color #e5e5e5}Ram $mem $alignr Swap $swap
${color #ffcb48}Processes ${hr 2}
${color #98c2c7}NAME PID CPU% MEM%
${color #e5e5e5}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #e5e5e5}${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #e5e5e5}${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color #e5e5e5}${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color #ffcb48} Memory ${hr 2}
${color #98c2c7}NAME PID CPU% MEM%
${color #e5e5e5}${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #e5e5e5}${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #e5e5e5}${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color #e5e5e5}${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${color #ffcb48}Networking ${hr 2}
${color #e5e5e5}ip address: $color${addr eth0}
${color #e5e5e5}down: $color${downspeed eth0}k/s
${color #e5e5e5}up: $color${upspeed eth0}k/s
${color #ffccaa}derekstormed@gmail.com
${color #e5e5e5}${texeci 120 python ~/gmail.py}
Here is my gmail.py:
Code:
import feedparser
from sys import stdout
d=feedparser.parse("https://derekstormed:password@gmail.google.com/gmail/feed/atom")
stdout.write(str(len(d['entries'])))
How do I make it work?
Bookmarks