This must be the best thread I've seen yet! I didn't even know what conky was before I stumbled on it. Anyway, I've been reading man pages and stealing from you guys and after some mucking about I came up with this on my Feisty64-Fluxbox setup.
There are some minor issues with it though. First, double buffer doesn't work. When I have that option enabled and start conky in a terminal I get:Code:# Create own window instead of using desktop (required in nautilus) own_window no # own_window_hints undecorated,below,skip_taskbar # background no # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer no use_xft yes # Update interval in seconds update_interval 3.0 # Minimum size of text area minimum_size 400 5 # Draw shades? draw_shades yes # Text stuff draw_outline no # amplifies text if yes draw_borders no uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? stippled_borders 8 # border margins border_margin 4 # border width border_width 1 # Default colors and also border colors, grey90 == #e5e5e5 default_color white default_shade_color black default_outline_color white #own_window_colour brown #own_window_transparent yes # 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 10 # gap_y 10 # stuff after 'TEXT' will be formatted on screen override_utf8_locale no xftfont Terminus:size=8 xftalpha 0.8 TEXT ${offset 860}${color slate grey}Hostname: ${color }$nodename ${offset 860}${color slate grey}Kernel: ${color }$kernel ${offset 860}${color slate grey}System uptime: ${color }$uptime ${offset 860}${color slate grey}Date: ${color }${time %a, %e %b %G} ${offset 860}${color slate grey}Time: ${color }${time %H:%M %Z} ${offset 895}${color }${tztime UTC %H:%M} UTC ${offset 860}${color slate grey}CPU:${color } $cpu% ${acpitemp}C ${offset 860}${cpugraph 20,145 000000 ffffff} ${offset 860}${color slate grey}Load: ${color }$loadavg ${offset 860}${color slate grey}Processes: ${color }$processes ${offset 860}${color slate grey}Running: ${color }$running_processes ${offset 860}${color slate grey}Highest CPU: ${offset 860}${color #ddaa00} ${top name 1}${top_mem cpu 1} ${offset 860}${color lightgrey} ${top name 2}${top cpu 2} ${offset 860}${color lightgrey} ${top name 3}${top cpu 3} ${offset 860}${color lightgrey} ${top name 4}${top cpu 4} ${offset 860}${color slate grey}MEM: ${color } $memperc% $mem/$memmax ${offset 860}${membar 3,100} ${offset 860}${color slate grey}SWAP:${color} $swapperc% $swap/$swapmax ${offset 860}${swapbar 3,100} ${offset 860}${color slate grey}Highest MEM: ${offset 860}${color #ddaa00} ${top_mem name 1}${top_mem mem 1} ${offset 860}${color lightgrey} ${top_mem name 2}${top_mem mem 2} ${offset 860}${color lightgrey} ${top_mem name 3}${top_mem mem 3} ${offset 860}${color lightgrey} ${top_mem name 4}${top_mem mem 4} ${offset 860}${color slate grey}ROOT: ${color }${fs_free /}/${fs_size /} ${offset 860}${fs_bar 3,100 /} ${offset 860}${color slate grey}HOME: ${color }${fs_free /home}/${fs_size /home} ${offset 860}${fs_bar 3,100 /home} ${offset 860}${color slate grey}IP: ${color }${addr eth0} ${offset 860}${color slate grey}Up: ${color }${upspeed eth0} k/s ${offset 860}${upspeedgraph eth0 20,145 000000 ffffff} ${offset 860}${color slate grey}Down: ${color }${downspeed eth0}k/s${color} ${offset 860}${downspeedgraph eth0 20,145 000000 ffffff}
Now, I know that this option doesn't work for everyone but is there some tweaking that might remedy it?Code:Conky: failed to set up double buffer Conky: drawing to single buffer
Second, conky seem to give me this background. Or something is at any rate and it wasn't me. When I boot I get another (a light grey-blueish thing) which disappears as this shows up with conky. Now, in my ~/.fluxbox/startup file I don't have any wallpaper set at all. There is one by default which sets it to solid black but I commented it out. When it was read, I got that as my first wallpaper only to be replaced by this one as conky starts up. Really weird. Any ideas on where it comes from. I've gotten to like this wallpaper and will use it for know but I'd like to set it in my startup file so I can change it once I find something I like better.
Third, I've tried to reduce the flickering. Now, double buffer didn't work so I tried to run conky in its own window. However, that seem to do two things, namely to; (A) interfere with the Fluxbox menu (which is opened by right-clicking on the desktop) so that it's opened and immediately closed (it should stay open after first click) and (B) only setting this dark grey/matted black wallpaper on the area used by the conky window (i.e. under the download bar there will be a field across the entire screen of the original wallpaper, either the solid black or the grey-bluish thing). Personally, I don't mind whether conky runs in it's own window or not as long it looks good, doesn't interfere with my fluxbox menu and preferably don't flicker too much. Any ideas on this?
EDIT: The dark grey/matted black is actually the default (-flat grey20) for the style I'm using (a modified 'twice') and the grey/bluish thing is actually from the login-screen. Why on earth that would linger is beyond me but it works now as long as I don't use conkly in its own window (though it still flickers a bit).
Forth, I've got my IP showing but what I really want is the external IP, not the internal. How can I change this?
Any help would be much appreciated.
Conky is really an awesome application and I'll be tweaking this for a while
Best regards
/mojoman
Last edited by mojoman; September 6th, 2007 at 08:34 AM.
http://www.elisanet.fi/~z626117/random/conky.jpg
Code:background yes update_interval 1.0 total_run_times 0 own_window yes own_window_type normal own_window_transparent yes own_window_colour black own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 300 5 maximum_width 300 #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right #alignment none gap_x 60 gap_y 60 use_xft yes xftfont Candara:size=10 xftalpha 0.8 uppercase no override_utf8_locale yes use_spacer no #default_color dedede default_color d2d2d2 default_shade_color 404040 #default_outline_color 404040 default_outline_color 808080 draw_shades yes draw_outline no draw_borders no draw_graph_borders no stippled_borders 2 border_margin 4 border_width 1 mpd_host localhost mpd_port 6600 mail_spool $MAIL no_buffers yes cpu_avg_samples 2 net_avg_samples 2 TEXT ${font size=11}${color ffffff}${shadecolor 202020}$nodename$shadecolor$color$font - $sysname $kernel on $machine $hr ${voffset -8}${color ffffff}${shadecolor 202020}STATUS :$shadecolor$color ${voffset -12}$hr Uptime: $uptime - Load:$color $loadavg Processes: Running: $processes Active: $running_processes Power: $acpiacadapter, $battery $hr ${voffset -8}${color ffffff}${shadecolor 202020}PROCESSOR :$shadecolor$color ${voffset -12}$hr ${voffset -12}${cpugraph cpu0 99,299 04578a 079ffb} ${voffset -101}Intel Core Duo T2300: $acpitemp °C Core 1: ${freq 1} MHz ${cpu cpu1}% ${cpubar cpu1} Core 2: ${freq 2} MHz ${cpu cpu2}% ${cpubar cpu2} $hr ${voffset -8}${color ffffff}${shadecolor 202020}MEMORY :$shadecolor$color ${voffset -12}$hr $mem / $memmax $memperc% ${membar} $hr ${voffset -8}${color ffffff}${shadecolor 202020}STORAGE :$shadecolor$color ${voffset -12}$hr File systems: System: ${fs_used /} / ${fs_size /} ${fs_bar /} Storage: ${fs_used /mnt/storage} / ${fs_size /mnt/storage} ${fs_bar /mnt/storage}${if_mounted /media/Helios} Helios: ${fs_used /media/Helios} / ${fs_size /media/Helios} ${fs_bar /media/Helios}${endif}${if_mounted /media/EOS} Eos: ${fs_used /media/EOS} / ${fs_size /media/EOS} ${fs_bar /media/EOS}${endif} $hr ${voffset -8}${color ffffff}${shadecolor 202020}NETWORK :$shadecolor$color ${voffset -12}$hr ${voffset -12}${downspeedgraph eth1 64,150 04578a 079ffb}${upspeedgraph eth1 64,149 8A1104 FB2507} ${voffset -67}Wireless: Connection strength: ${linkstatus eth1}% Down: ${downspeed eth1} Kb/s${offset 80}Up: ${upspeed eth1} Kb/s $hr ${voffset -8}${color ffffff}${shadecolor 202020}MUSIC :$shadecolor$color ${voffset -12}$hr ${alignc}$mpd_artist ${font size=12}${color ffffff}${shadecolor 202020}${alignc}$mpd_title$shadecolor$color$font ${alignc}$mpd_album $mpd_bar $mpd_elapsed / $mpd_length${alignr}$mpd_bitrate Kbps
I just got the progress bar to work with xmms. You put that script somewhere safe, make it executable, and have conky reference it.
background yes
use_xft yes
xftfont HandelGotD:size=8
xftalpha 0.1
update_interval 1.2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 5
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color gray
default_shade_color gray
default_outline_color green
alignment top_right
gap_x 18
gap_y 48
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale no
use_spacer yes
TEXT
$sysname $kernel $alignr $machine
Core 2 Duo E6420 $alignr${freq_g cpu0}Ghz
IP adress $alignr ${addr eth0}
Time now $alignr ${time %H:%M:%S}
$alignr
${cpugraph cpu0 16,200 ffffff ffffff}
CPU:1 ${cpu cpu1}% ${cpubar cpu1}
CPU:2 ${cpu cpu2}% ${cpubar cpu2}
MEM $alignc $mem / $memmax $alignr $memperc%
$membar
/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}%
${fs_bar /home}
/disk $alignc ${fs_used /media/disk} / ${fs_size /media/disk} $alignr ${fs_free_perc /media/disk}%
${fs_bar /media/disk}
Disk i/o ${diskiograph 8,000}
${color orange}fortune ${hr 2}$color
${execi 120 fortune -s | fold -w50}
Code:#!/bin/bash #This script is free to modify and distribute. #Use at your own risk. #Requirement: xmms-infopipe #User Settings here maxcol=35 file=/tmp/xmms-info #Grab needed information pos=`cat $file | grep uSecPosition: | cut -d : -f2` len=`cat $file | grep uSecTime: | cut -d : -f2` #Count the length in characters of the title size=`echo $title | wc -c` #Calculate current position within that length poscol=$(echo "$pos*$maxcol/$len" | bc) #Printing for (( i=0; i<$maxcol; i++ )) do if [ $i -eq $poscol ]; then echo -n 'O' else echo -n '=' fi done
Well, this is a nice utility. I just threw out my WM-apps and duct-taped up an inconspicuous horizontal display to match my Openbox theme.
Is there a way to set width constraints for blocks? It'd make it easier to lay out things in a grid so that they line up predictably in the vertical (unlike those ugly alignrs down there).
.conkyrc:
Code:alignment bottom_left background yes border_margin 1 border_width 1 default_color FFC600 default_outline_color FFC600 default_shade_color 674E31 draw_borders no draw_graph_borders yes draw_outline no draw_shades no override_utf8_locale yes update_interval 1 use_xft yes xftfont Gentium:pixelsize=12 gap_x 0 gap_y -20 own_window yes own_window_hints undecorated,below,sticky own_window_type desktop double_buffer yes TEXT ${voffset -5} ${cpubar 20,80 674E31 FFC600} ${diskiograph 20,80 674E31 FFC600} ${downspeedgraph eth0 20,80 FFC600 00F F00} ${upspeedgraph eth0 20,80 674E31 FFC600} ${membar 20,80 674E31 FFC600} ${voffset -5}${time %k:%M:%S} ${offset 20} ${cpu cpu0} ${alignr 190} ${diskio} ${alignr 120} ${downspeed eth0} ${alig nr 50} ${upspeed eth0} ${alignr} ${mem}
.conkyrcweather is the same, but in lower_right, update interval 10 minutes, and with:
Weatherget munger, my approximately second-ever Perl script:Code:TEXT ${exec ~/usr/bin/weatherget -s FIXX0002 --metric | perl ~/code/perl/wea2.pl}
Code:#/usr/bin/perl printf "EFHF "; while (<>) { if (/Helsinki-/) { @asdf = split / /; @klokc = split(/:/, (split / /)[4]); $tun = (@asdf[5] eq "PM")?(@klokc[0]+12):(@klokc[0]); printf "%2d:%s ",$tun, @klokc[1]; } else { @asdf = split / : /, $_; if (@asdf[0] =~/Temperature/) { @vittu = (split / /,@asdf[1]); printf "%2.0dC ", @vittu[0]; } else { if (@asdf[0] =~/Wind/) { @vittu = (split / /, @asdf[1]); printf "%2.1fm/s %s ", @vittu[0]/3.6,substr(@vittu[5],0,-1); } else { if (@asdf[0] =~/Humidity/) { printf "%s% ",substr(@asdf[1], 0,-3); } else { if (@asdf[0] =~/Barometer/) { printf "%smb ",(split / /,@asdf[1])[0]; } else { if (@asdf[0] =~/Sunrise/) { printf "%s-",(split / /,@asdf[1])[0]; } else { if (@asdf[0] =~/Sunset/) { @vittu = split /:/,@asdf[1]; printf "%2d:%s ",@vittu[0]+12,substr(@vittu[1],0,2); } } } } } } } }
Last edited by darsu; September 7th, 2007 at 03:37 PM.
Bookmarks