Wednesday, April 06, 2011

Now I've got Conky in Natty on the EeePC 901


I must be really impressed with Conky as I've now gone ahead and configured a more compact version for my netbook.
The screenshot shows how it looks.
I present my .conkyrc file below
As opposed to what I did yesterday, I was able to use just one .conkyrc file to display all of the information I wanted and this time I avoided the problems in displaying temperatures such as 15°C which before had appeared as 15°C
I did this by installing conkyforecast as detailed here and then using the conkyrc file in /usr/share/conkyforecast/example/ as the basis for my final .conkyrc. In other words, the configuration section from /usr/share/conkyforecast/example/conkyrc was largely unchanged in my final .conkyrc.
I removed the more detailed forecast part from the above and displayed only the Standard Output just to save space on the tiny netbook screen.
Next, I copied the .conkyrc file (the stuff under TEXT only) from the first post here and deleted what I didn't want from this.
As before, I added the external IP information using the code and script described in post #2 here.
The Gmail section I got from the first post in this thread.
I copied the time and date part from somewhere else but forgot to make a note of from where. However, there's nothing unusual in the code.
OK, here's my "slightly munged" .conkyrc (items in BOLD are munged and should be replaced by your own data).

# conky configuration
# set to yes if you want Conky to be forked in the background
background no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=9

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1.0

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window_hints below

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 300 0
maximum_width 300

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
draw_graph_borders yes

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color white

# own window options
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# 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
# same thing as passing -x at command line
gap_x 10
gap_y 15

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer right

# colours
color1 white
# light blue
color2 6892C6
# orange
#E77320
color3 FC8820
# green
color4 78BF39
# red
color5 CC0000

text_buffer_size 2048

# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument

# stuff after 'TEXT' will be formatted on screen

TEXT
#${offset -5}${color3}${font StyleBats:style=CleanCut:size=12}q ${voffset -2}${font Bitstream Vera Sans Mono:style=Bold:size=11}Weather${font} ${hr}${color1}
#${color3}Template Output:${color1}
#${execpi 1800 conkyForecast --location=EIXX0026 --template=/usr/share/conkyforecast/example/conkyForecast.template}

#${color3}Standard Output:${color1}
${font Bitstream Vera Sans Mono:size=14}${color #00ff00}${execi 1800 conkyForecast --location=EIXX0026 --datatype=CT}${font}
${font ConkyWeather:style=Bold:size=40}${color1}${execi 1800 conkyForecast --location=EIXX0026 --datatype=WF} ${font ConkyWindNESW:size=40}${execi 1800 conkyForecast --location=EIXX0026 --datatype=BS}${font}
${execi 1800 conkyForecast --location=EIXX0026 --datatype=HT --centeredwidth=4}/${execi 1800 conkyForecast --location=EIXX0026 --datatype=LT --centeredwidth=4} ${execi 1800 conkyForecast --location=EIXX0026 --datatype=WS --imperial} - ${execi 1800 conkyForecast --location=EIXX0026 --datatype=WD}
${exec conkyForecast-SunsetSunriseCountdown --location=EIXX0026 -t} in ${exec conkyForecast-SunsetSunriseCountdown --location=EIXX0026 -L}

${color Gray}IP internal $alignr ${addr eth0}
External IP $alignr #${execi 3600 ~/scripts/conkyip}

Inbound $alignr ${downspeed eth0} kb/s
${downspeedgraph eth0}
Outbound $alignr ${upspeed eth0} kb/s
${upspeedgraph eth0}
#$processes processes ($running_processes running)
${color Grey}CPU $alignr ${cpu cpu0}%
${cpubar cpu0}

NAME $alignr PID    CPU MEM
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}

${color #00ff00}Gmail
${execi 60 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=myuser --password=mypassword --ssl}

${color white}${alignc 35}${font Trebuchet MS:size=30}${time %H:%M:%S}${font}
${alignc}${time %a %d %b %Y}

No comments:

Post a Comment