About the network bar stinkeyes method worked great but the problem was it was burning a bit too much CPU cycles in each interval and i would not feel comfortable using it. And it didn't burn that much but still CPU jumping to 0.7% in each interval is something i would rather not do because without it everything i want to monitor currently burns 0.0 most of the time.
I will test all your suggestion but probably next week and i thank you all for the suggestion. This thread is really the place where any Conky user on the planet should be if it want's to learn something about Conky. Thanks again.
This seemed to work for me:
Screenshot - 05042013 - 07:00:28 PM.png
(numbers to the right of the bars are total data downloaded/uploaded)
My advertised top speeds for my internet service is 1.5Mb/s (192 KB/s) download, and 384 Kb/s (48 KB/s) upload. Using "downspeedf" and "upspeedf" in a linear scale seems to work fine for my purposes. You would have to rescale to your internet speeds.Code:${Font}Ethernet Private IP:${alignr}${addr eth0} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}d${outlinecolor}${font}${if_match ${downspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${downspeedf eth0} <= 19}${color5}|${color6}||||||||||${color}${else}${if_match ${downspeedf eth0} <= 38}${color5}||${color6}|||||||||${color}${else}${if_match ${downspeedf eth0} <= 58}${color5}|||${color6}||||||||${color}${else}${if_match ${downspeedf eth0} <= 77}${color5}||||${color6}|||||||${color}${else}${if_match ${downspeedf eth0} <= 96}${color5}|||||${color6}||||||${color}${else}${if_match ${downspeedf eth0} <= 115}${color5}||||||${color6}|||||${color}${else}${if_match ${downspeedf eth0} <= 134}${color5}|||||||${color6}||||${color}${else}${if_match ${downspeedf eth0} <= 154}${color5}||||||||${color6}|||${color}${else}${if_match ${downspeedf eth0} <= 173}${color5}|||||||||${color6}||${color}${else}${if_match ${downspeedf eth0} < 192}${color5}||||||||||${color6}|${color}${else}${if_match ${downspeedf eth0} >= 192}${color5}|||||||||||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${alignr}${totaldown eth0} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}u${outlinecolor}${font}${if_match ${upspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${upspeedf eth0} <= 4.8}${color5}|${color6}||||||||||${color}${else}${if_match ${upspeedf eth0} <= 9.6}${color5}||${color6}|||||||||${color}${else}${if_match ${upspeedf eth0} <= 14}${color5}|||${color6}||||||||${color}${else}${if_match ${upspeedf eth0} <= 19}${color5}||||${color6}|||||||${color}${else}${if_match ${upspeedf eth0} <= 24}${color5}|||||${color6}||||||${color}${else}${if_match ${upspeedf eth0} <= 29}${color5}||||||${color6}|||||${color}${else}${if_match ${upspeedf eth0} <= 34}${color5}|||||||${color6}||||${color}${else}${if_match ${upspeedf eth0} <= 38}${color5}||||||||${color6}|||${color}${else}${if_match ${upspeedf eth0} <= 43}${color5}|||||||||${color6}||${color}${else}${if_match ${upspeedf eth0} < 48}${color5}||||||||||${color6}|${color}${else}${if_match ${upspeedf eth0} >= 48}${color5}|||||||||||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${alignr}${totalup eth0}
Last edited by Petro Dawg; May 6th, 2013 at 12:45 AM. Reason: cleaned up the code a bit
Who's Awesome? You're Awesome.
I've seem to literally reach the limit to what I can do in a single Conky without branching out to LUA scripts. For the first time, I've had conky crash while complaining to me about having too many fonts. Also, there appears to be a character length limit or variable number limit in Conky of which I was not aware. While trying to code in more features in my script I noticed my calendar began returning error messages or just disappearing. I guess the code for my custom bar graphs are just a tad long.
>>> Update <<<
Thanks to Mrpeachy's advice in the post below, I can now continue to expand my Conky beyond the default limits.
Here's the final results of today's playing around.
Screenshot - 05052013 - 12:43:11 AM.jpg
Code:############################################################################################ # # # .conkyrc (version 1.11) # # A clean, simple, yet useful configuration code for conky # # # # Written by Petro Dawg (aka Greg): # # Last updated on 5/4/13 (version 1.11) # # > Replaced bar graphs with my own design # # > Added bar graph for upload and download speeds # # Updated on 4/16/13 (version 1.10) # # > Added Pithos music player information # # > System updates only display if updates are available # # Updated on 4/2/13 (version 1.09) # # > Added calendar # # Updated on 4/1/13 (version 1.08) # # > Ported to my XCFE system # # - Changed USB check location to begin at sdc1 (was sdb1) # # - Deleted CPU2 info (now 1 core system) # # - Deleted Temp info (sensors not compatible) # # > Changed color scheme to Blue and White # # > Limited system update checking to once per hour due to high resource cost of # # apt-check process # # > Edited to correct some text alignment issues # # Updated on 1/4/13 (version 1.07) # # > Added available sytem update fields # # ] Added router name and signal strength field (deleted to make room for better bars) # # > Changed most of the grep commands to awk # # Updated on 12/30/12 (version 1.06) # # ] Changed to grey and orange color scheme -later changed- # # > revamped fonts, reverted many changes made in last version # # ] Added date field -later removed/replace by calendar- # # Updated on 12/24/12 (version 1.05) # # > Changed color scheme to neon -later changed- # # ] Added fonts for Ubuntu symbol and CPU bar numbers -no longer used- # # Updated on 9/14/12 (version 1.04) # # ] Added MAC and Public IP addresses to output -now deactivated but still in code- # # > USB output will disappear from Conky when USB drive is ejected # # Updated on 9/2/12 (version 1.03) # # > Made USB file system output read any USB drive reguardless of name. Supports up to # # three USB drives. Displays names of each USB drive and memory_used/memory_total # # > Added more color control # # > Changed override_utf8_locale value from 'no' to 'yes' (stopped 12.04-3D flashing) # # > Changed font Ubuntu:bold:size=11 to xftfont Ubuntu:bold:size=11 # # > Changed no_buffers value from 'no' to 'yes' (fixed ram graph output) # # > Added degree symbol to temperature output -no longer used- # # Updated on 8/31/12 (version 1.02) # # > Deleted redundant outputs and adjusted format to make the display more concise. # # Updated on 8/26/12 (version 1.01) # # > Based on source code from http://lonelymachines.org/2012/08/16/simple-conky-config/ # # > This version has been significately modified to meet my needs and reorganized to # # add clarity for anyone wanting to modify the code further to meet their own needs. # # # # Displays the following PC information on the Desktop within an embedded window: # # > Operating System details # # > Number of available system updates # # > CPU operating speed # # > Individual core usage # # > Top 3 processes using CPU resources # # > Total RAM # # > Active RAM amount # # > Top 3 processes using RAM resources # # > Root folder size and memory used # # > Home folder size and memory used # # > USB drive size and memory used (when attached) # # > Private and Public IP Addresses # # > Download speed and data Received # # > Upload speed and data Sent # # > Monthly Calendar # # # # Requires installation of: # # > conky (available in software center) # # ] lm-sensors (available in software center) -not needed in current version- # # > Pithos (http://kevinmehall.net/p/pithos/) # # > php5-cli (sudo apt-get install php5-cli) # # # # Additional information and resources: # # > To run conky at startup, create an empty file in your home folder, name it # # ".conky-startup.sh" and copy the following 2 lines in it: # # !/bin/bash # # sleep 15 && conky ; # # Add the path to the .conky-startup.sh file within Startup Applications. # # > http://conky.sourceforge.net/ # # > http://www.graphviz.org/doc/info/colors.html # # > http://www.december.com/html/spec/colorhex.html # # > alfios, heydings, monofonto fonts required # # > Save fonts to .fonts folder in home screen # # > To load fonts into Conky after font installation run the following in terminal: # # fc-cache -fv # # then reboot system if needed # # # ############################################################################################ #conky performance settings update_interval 3.0 total_run_times 0 cpu_avg_samples 4 no_buffers yes double_buffer yes override_utf8_locale yes max_specials 1024 text_buffer_size 1024 max_user_text 32768 #overall position of conky window alignment middle_right gap_x 15 gap_y 0 minimum_size 300 145 maximum_width 145 #overall appearance of conky window own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager draw_borders no #default text apperance use_xft yes xftalpha 0.9 xftfont Alfios:size=10 default_color aliceblue draw_shades no draw_outline no default_shade_color black default_outline_color black uppercase no #border around graphs draw_graph_borders no #colors color1 lightskyblue color2 blue color3 red color4 gold color5 deepskyblue color6 dimgrey #bisque4 ############################################################################################ # # # The code below 'TEXT' will control what is displayed by conky: # # -> In the interest of clarity, the system outputs are divided into related groups # # (i.e. all code related to the CPU is in one grouping of adjacent lines while code # # related to RAM is in another grouping of adjacent lines). Each group is hereafter # # refered to as a 'TEXT code block'. # # -> To best fit your screen, adjust the overall vertical length of the display by # # adding or deleting empty lines either before or after the TEXT code blocks below. # # # ############################################################################################ TEXT ############################################################################################ # # # The first TEXT code block displays operating system information # # -> 'Updates Available' displays total updates avaible from all software sources # # activated in the update manager # # -> 'Security Updates' displays the number those available updates which are related # # to system security # # # ############################################################################################ ${image /home/greg/Documents/Conky/Main/fang.png -p 0,0 -s 105x110} ${voffset 58}${color1}${offset 69}${font Alfios:bold:size=11}X${font}ubuntu 12.10${color} ${voffset 0}${alignr}${kernel} ${font Alfios:size=9}${if_match ${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/can/ {print $1}'}>0}${offset 10}Updates Available:${alignr}${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/can/ {print $1}'} ${offset 10}Security Updates:${alignr}${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/are/ {print $1}'} ${endif}${font} ############################################################################################ # # # The second TEXT code block displays CPU information # # -> Temperature displayed is the PCI Adapter temp1 output on same line as 'high' output # # -> Requires the installation of lm-sensors to work: sudo apt-get lm-sensors # # -> After installation run: sensors-detect (answer yes to all) # # -> Run 'sensors' in terminal to determine which line needs grep & which columns # # needs to be cut. # # -> Replace: ${cpubar cpu1 5} with ${cpugraph cpu1 FFFF00 FF0000} to change to graph # # output of CPU1 usage. # # -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors # # you like. Goto www.graphviz.org/doc/info/colors.html for color information (hold # # mouse over color to see HEX code for that color). # # -> Add % use outputs for cores by adding the following line: # # Core '#': ${alignr}${cpu cpu'#'}% # # (repeat for each additional core up to the total number of cores in the system) # # (replace each '#' with the number of the core (i.e. 3 or 4)) # # # ############################################################################################ CPU${font Monofonto:bold:size=7}${voffset -2}${offset 11}${if_match ${cpu cpu0} == 0}${color6}|||||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 5}${color5}|${color6}||||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 10}${color5}||${color6}|||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 15}${color5}|||${color6}||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 20}${color5}||||${color6}|||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 25}${color5}|||||${color6}||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 30}${color5}||||||${color6}|||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 35}${color5}|||||||${color6}||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 40}${color5}||||||||${color6}|||||||||||||${color}${else}${if_match ${cpu cpu0} <= 45}${color5}|||||||||${color6}||||||||||||${color}${else}${if_match ${cpu cpu0} <= 50}${color5}||||||||||${color6}|||||||||||${color}${else}${if_match ${cpu cpu0} <= 55}${color5}|||||||||||${color6}||||||||||${color}${else}${if_match ${cpu cpu0} <= 60}${color5}|||||||||||${color4}|${color6}|||||||||${color}${else}${if_match ${cpu cpu0} <= 65}${color5}|||||||||||${color4}||${color6}||||||||${color}${else}${if_match ${cpu cpu0} <= 70}${color5}|||||||||||${color4}|||${color6}|||||||${color}${else}${if_match ${cpu cpu0} <= 75}${color5}|||||||||||${color4}||||${color6}||||||${color}${else}${if_match ${cpu cpu0} <= 80}${color5}|||||||||||${color4}|||||${color6}|||||${color}${else}${if_match ${cpu cpu0} <= 85}${color5}|||||||||||${color4}||||||${color6}||||${color}${else}${if_match ${cpu cpu0} <= 90}${color5}|||||||||||${color4}|||||||${color6}|||${color}${else}${if_match ${cpu cpu0} <= 95}${color5}|||||||||||${color4}|||||||${color3}|${color6}||${color}${else}${if_match ${cpu cpu0} < 100}${color5}|||||||||||${color4}|||||||${color3}||${color6}|${color}${else}${if_match ${cpu cpu0} == 100}${color5}|||||||||||${color4}|||||||${color3}|||${color}${else}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${font Alfios:size=9} ${voffset 4}${offset 10}${top name 1}${alignr}${top cpu 1} ${offset 10}${top name 2}${alignr}${top cpu 2} ${offset 10}${top name 3}${alignr}${top cpu 3} ${font} ############################################################################################ # # # Third TEXT code block displays RAM information: # # -> Replace ${membar 10} with ${memgraph FFFF00 FF0000} to change to graph output of # # RAM usage. (I did not find this very useful as RAM usage is usually fairly steady # # on my sytem.) # # # ############################################################################################ RAM${font Monofonto:bold:size=7}${voffset -2}${offset 8}${if_match ${memperc} == 0}${color6}|||||||||||||||||||||${color}${else}${if_match ${memperc} <= 5}${color5}|${color6}||||||||||||||||||||${color}${else}${if_match ${memperc} <= 10}${color5}||${color6}|||||||||||||||||||${color}${else}${if_match ${memperc} <= 15}${color5}|||${color6}||||||||||||||||||${color}${else}${if_match ${memperc} <= 20}${color5}||||${color6}|||||||||||||||||${color}${else}${if_match ${memperc} <= 25}${color5}|||||${color6}||||||||||||||||${color}${else}${if_match ${memperc} <= 30}${color5}||||||${color6}|||||||||||||||${color}${else}${if_match ${memperc} <= 35}${color5}|||||||${color6}||||||||||||||${color}${else}${if_match ${memperc} <= 40}${color5}||||||||${color6}|||||||||||||${color}${else}${if_match ${memperc} <= 45}${color5}|||||||||${color6}||||||||||||${color}${else}${if_match ${memperc} <= 50}${color5}||||||||||${color6}|||||||||||${color}${else}${if_match ${memperc} <= 55}${color5}|||||||||||${color6}||||||||||${color}${else}${if_match ${memperc} <= 60}${color5}|||||||||||${color4}|${color6}|||||||||${color}${else}${if_match ${memperc} <= 65}${color5}|||||||||||${color4}||${color6}||||||||${color}${else}${if_match ${memperc} <= 70}${color5}|||||||||||${color4}|||${color6}|||||||${color}${else}${if_match ${memperc} <= 75}${color5}|||||||||||${color4}||||${color6}||||||${color}${else}${if_match ${memperc} <= 80}${color5}|||||||||||${color4}|||||${color6}|||||${color}${else}${if_match ${memperc} <= 85}${color5}|||||||||||${color4}||||||${color6}||||${color}${else}${if_match ${memperc} <= 90}${color5}|||||||||||${color4}|||||||${color6}|||${color}${else}${if_match ${memperc} <= 95}${color5}|||||||||||${color4}|||||||${color3}|${color6}||${color}${else}${if_match ${memperc} < 100}${color5}|||||||||||${color4}|||||||${color3}||${color6}|${color}${else}${if_match ${memperc} == 100}${color5}|||||||||||${color4}|||||||${color3}|||${color}${else}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${font}${font Alfios:size=9} ${voffset 4}${offset 10}${top_mem name 1}${alignr}${top_mem mem 1} ${offset 10}${top_mem name 2}${alignr}${top_mem mem 2} ${offset 10}${top_mem name 3}${alignr}${top_mem mem 3} ${font} ############################################################################################ # # # Fourth TEXT code block displays Filesystem information: # # -> The USB information is specific to the USB drive settings on my computer (i.e. my # # 1st USB mounts at /dev/sdb1). Run 'df' in terminal to determine location of drives. # # -> To make conky display correctly the cut locations for sdb1, sdc1, sdd1, & sdc may # # need to be adjusted. # # # ############################################################################################ ${if_match ${swapperc} > 0} SWP ${color}${alignr}$swap/$swapmax ${else}${endif} HD ${alignr}${fs_used /} / ${fs_size /}${if_existing /dev/sdc1} ${execp df -H | grep 'sdc1' | cut -c56-66}:${alignr}${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}${else}${endif}${if_existing /dev/sdd1} ${execp df -H | grep 'sdd1' | cut -c56-66}:${alignr}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}${else}${endif}${if_existing /dev/sde1} ${execp df -H | grep 'sde1' | cut -c56-66}:${alignr}${execp df -H | awk '/sde1/ {print $3, "/", $2}'}${else}${endif} ############################################################################################ # # # Fith TEXT code block displays Network information: # # -> A graphical output of download information can be displayed by adding the following # # line of code: # # ${color2}${downspeedgraph wlan0 FFFF00 FF0000}${color} # # -> A graphical output of upload information can be displayed by adding the following # # line of code: # # ${color2}${upspeedgraph wlan0 FFFF00 FF0000}${color} # # -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors # # you like. Goto www.graphviz.org/doc/info/colors.html for color information (hold # # mouse over color to see HEX code for that color). ifconfig -a # # # ############################################################################################ Ethernet Private IP:${alignr}${addr eth0} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}d${outlinecolor}${font Monofonto:bold:size=7} ${voffset -2}${if_match ${downspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${downspeedf eth0} <= 19}${color5}|${color6}||||||||||${color}${else}${if_match ${downspeedf eth0} <= 38}${color5}||${color6}|||||||||${color}${else}${if_match ${downspeedf eth0} <= 58}${color5}|||${color6}||||||||${color}${else}${if_match ${downspeedf eth0} <= 77}${color5}||||${color6}|||||||${color}${else}${if_match ${downspeedf eth0} <= 96}${color5}|||||${color6}||||||${color}${else}${if_match ${downspeedf eth0} <= 115}${color5}||||||${color6}|||||${color}${else}${if_match ${downspeedf eth0} <= 134}${color5}|||||||${color6}||||${color}${else}${if_match ${downspeedf eth0} <= 154}${color5}||||||||${color6}|||${color}${else}${if_match ${downspeedf eth0} <= 173}${color5}|||||||||${color6}||${color}${else}${if_match ${downspeedf eth0} < 192}${color5}||||||||||${color6}|${color}${else}${if_match ${downspeedf eth0} >= 192}${color5}|||||||||||${color}${else}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${font} ${alignr}${font Alfios:size=9}${totaldown eth0} ${font} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}u${outlinecolor}${color}${font Monofonto:bold:size=7} ${voffset -2}${if_match ${upspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${upspeedf eth0} <= 4.8}${color5}|${color6}||||||||||${color}${else}${if_match ${upspeedf eth0} <= 9.6}${color5}||${color6}|||||||||${color}${else}${if_match ${upspeedf eth0} <= 14}${color5}|||${color6}||||||||${color}${else}${if_match ${upspeedf eth0} <= 19}${color5}||||${color6}|||||||${color}${else}${if_match ${upspeedf eth0} <= 24}${color5}|||||${color6}||||||${color}${else}${if_match ${upspeedf eth0} <= 29}${color5}||||||${color6}|||||${color}${else}${if_match ${upspeedf eth0} <= 34}${color5}|||||||${color6}||||${color}${else}${if_match ${upspeedf eth0} <= 38}${color5}||||||||${color6}|||${color}${else}${if_match ${upspeedf eth0} <= 43}${color5}|||||||||${color6}||${color}${else}${if_match ${upspeedf eth0} < 48}${color5}||||||||||${color6}|${color}${else}${if_match ${upspeedf eth0} >= 48}${color5}|||||||||||${color}${else}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${font}${alignr}${font Alfios:size=9}${totalup eth0} ${font} ############################################################################################ # # # Sixth TEXT code block displays Music info from Pithos: # # -> Requires installation of pithos and php5-cli to run a php script # # http://kevinmehall.net/p/pithos/ # # sudo apt-get install php5-cli # # # ############################################################################################ ${if_empty ${exec pgrep pithos}}${else} Pithos${font Alfios:size=9} ${color1}Song: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'title'} ${color1}Artist: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'artist'} ${color1}Album: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'album'}${font} ${endif} ############################################################################################ # # # Seventh TEXT code block displays a Calendar: # # -> Calendar requires use of a mono font for proper spacing of numbers and leters # # # ############################################################################################ ${execpi 600 date +"%B"} ${execpi 600 date +"%Y"}${alignr}${execpi 15 date +"%l:%M %p"} ${voffset -5}${color1}${hr 1}${color} ${font Monofonto:size=10}${execpi 600 DJS=`date +%_d`; cal -h | sed '1d' | sed s/"$DJS"'\b'/'${outlinecolor}${color1}'"$DJS"'${outlinecolor}${color}'/} ${voffset -20}${color1}${hr 1}${color}
Last edited by Petro Dawg; May 5th, 2013 at 07:07 AM. Reason: Figured out how to change number of specials which can be used
Who's Awesome? You're Awesome.
^ there are a couple of setting that might affect you
text_buffer_size (Size of the standard text buffer (default is 256 bytes))
max_specials (Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is 512))
- sounds like you have reached the specials limit of 512
when i was making elaborate conkyrc's i had those set ludicrously high
i would encourage you to branch out into lua scripts to extend what you can do in conky (but then of course i would )
Last edited by Petro Dawg; May 5th, 2013 at 07:09 AM.
Who's Awesome? You're Awesome.
I tried running my Conky (the one 3 posts up ^) over night with the following settings...
and still got a crash with the following message "Conky: you don't need that many fonts, sorry." It tends to take awhile before the crash occurs. Not sure what is really going on.Code:max_specials 1024 text_buffer_size 1024 max_user_text 32768
I've since stripped my Conky of many of its font changes; using far fewer than in my last known stable Conky. I now have 5 total font changes in my code using only 3 different font/size combinations. Hopefully that will stop the error.
Last edited by Petro Dawg; May 5th, 2013 at 02:32 PM.
Who's Awesome? You're Awesome.
Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU
First off, as usual your Conky looks awesome. I like the orange color scheme; goes well with your wallpaper.
Thanks for the suggestion of checking the 'endif' counts. I know I have lots of them in there, but I also have lots of ' ifmatch' statements to go with them (one for every 5% of the bar). I've checked that before several times (and again just now), I have 22 'ifmatch' and 22 'endif' for each of the big bars, and 12 'ifmatch' and 12 'endif' for the small ones. Typically when the 'endif' count is wrong I get some kind of message pointing it out in the terminal in which conky is running. I haven't had any such errors lately. I did notice while counting 'endif's again that I had an unnecessary 'else' in each bar before my line of 'endif's; they shouldn't have done any harm, but they weren't doing anything helpful either so they are now deleted.
I've been running my Conky now for several hours (having dramatically reduced the number of times the font/size changes) and so far it hasn't crashed or put up any error messages in terminal.
And the final results don't look half bad in my opinion...
Screenshot - 05052013 - 01:07:25 PM.png
The "stable" (so far) code:
Code:############################################################################################ # # # .conkyrc (version 1.11) # # A clean, simple, yet useful configuration code for conky # # # # Written by Petro Dawg (aka Greg): # # Last updated on 5/5/13 (version 1.11) # # > Replaced bar graphs with my own design # # > Added bar graph for upload and download speeds # # > Reduced number of font switches to prevent crash # # Updated on 4/16/13 (version 1.10) # # > Added Pithos music player information # # > System updates only display if updates are available # # Updated on 4/2/13 (version 1.09) # # > Added calendar # # Updated on 4/1/13 (version 1.08) # # > Ported to my XCFE system # # - Changed USB check location to begin at sdc1 (was sdb1) # # - Deleted CPU2 info (now 1 core system) # # - Deleted Temp info (sensors not compatible) # # > Changed color scheme to Blue and White # # > Limited system update checking to once per hour due to high resource cost of # # apt-check process # # > Edited to correct some text alignment issues # # Updated on 1/4/13 (version 1.07) # # > Added available sytem update fields # # ] Added router name and signal strength field (deleted to make room for better bars) # # > Changed most of the grep commands to awk # # Updated on 12/30/12 (version 1.06) # # ] Changed to grey and orange color scheme -later changed- # # > revamped fonts, reverted many changes made in last version # # ] Added date field -later removed/replace by calendar- # # Updated on 12/24/12 (version 1.05) # # > Changed color scheme to neon -later changed- # # ] Added fonts for Ubuntu symbol and CPU bar numbers -no longer used- # # Updated on 9/14/12 (version 1.04) # # ] Added MAC and Public IP addresses to output -now deactivated but still in code- # # > USB output will disappear from Conky when USB drive is ejected # # Updated on 9/2/12 (version 1.03) # # > Made USB file system output read any USB drive reguardless of name. Supports up to # # three USB drives. Displays names of each USB drive and memory_used/memory_total # # > Added more color control # # > Changed override_utf8_locale value from 'no' to 'yes' (stopped 12.04-3D flashing) # # > Changed font Ubuntu:bold:size=11 to xftfont Ubuntu:bold:size=11 # # > Changed no_buffers value from 'no' to 'yes' (fixed ram graph output) # # > Added degree symbol to temperature output -no longer used- # # Updated on 8/31/12 (version 1.02) # # > Deleted redundant outputs and adjusted format to make the display more concise. # # Updated on 8/26/12 (version 1.01) # # > Based on source code from http://lonelymachines.org/2012/08/16/simple-conky-config/ # # > This version has been significately modified to meet my needs and reorganized to # # add clarity for anyone wanting to modify the code further to meet their own needs. # # # # Displays the following PC information on the Desktop within an embedded window: # # > Operating System details # # > Number of available system updates # # > CPU operating speed # # > Individual core usage # # > Top 3 processes using CPU resources # # > Total RAM # # > Active RAM amount # # > Top 3 processes using RAM resources # # > Root folder size and memory used # # > Home folder size and memory used # # > USB drive size and memory used (when attached) # # > Private and Public IP Addresses # # > Download speed and data Received # # > Upload speed and data Sent # # > Monthly Calendar # # # # Requires installation of: # # > conky (available in software center) # # ] lm-sensors (available in software center) -not needed in current version- # # > Pithos (http://kevinmehall.net/p/pithos/) # # > php5-cli (sudo apt-get install php5-cli) # # # # Additional information and resources: # # > To run conky at startup, create an empty file in your home folder, name it # # ".conky-startup.sh" and copy the following 2 lines in it: # # !/bin/bash # # sleep 15 && conky ; # # Add the path to the .conky-startup.sh file within Startup Applications. # # > http://conky.sourceforge.net/ # # > http://www.graphviz.org/doc/info/colors.html # # > http://www.december.com/html/spec/colorhex.html # # > alfios, heydings, monofonto fonts required # # > Save fonts to .fonts folder in home screen # # > To load fonts into Conky after font installation run the following in terminal: # # fc-cache -fv # # then reboot system if needed # # # ############################################################################################ #conky performance settings update_interval 3.0 total_run_times 0 cpu_avg_samples 4 no_buffers yes double_buffer yes override_utf8_locale yes max_specials 1024 text_buffer_size 1024 max_user_text 32768 #overall position of conky window alignment middle_right gap_x 15 gap_y 0 minimum_size 300 145 maximum_width 145 #overall appearance of conky window own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager draw_borders no #default text apperance use_xft yes xftalpha 0.9 xftfont Alfios:size=10 default_color aliceblue draw_shades no draw_outline no default_shade_color black default_outline_color black uppercase no #border around graphs draw_graph_borders no #colors color1 lightskyblue color2 blue color3 red color4 yellow color5 cyan #deepskyblue color6 dimgrey #bisque4 ############################################################################################ # # # The code below 'TEXT' will control what is displayed by conky: # # -> In the interest of clarity, the system outputs are divided into related groups # # (i.e. all code related to the CPU is in one grouping of adjacent lines while code # # related to RAM is in another grouping of adjacent lines). Each group is hereafter # # refered to as a 'TEXT code block'. # # -> To best fit your screen, adjust the overall vertical length of the display by # # adding or deleting empty lines either before or after the TEXT code blocks below. # # # ############################################################################################ TEXT ############################################################################################ # # # The first TEXT code block displays operating system information # # -> 'Updates Available' displays total updates avaible from all software sources # # activated in the update manager # # -> 'Security Updates' displays the number those available updates which are related # # to system security # # # ############################################################################################ ${image /home/greg/Documents/Conky/Main/fang.png -p 0,0 -s 105x110} ${voffset 58}${color1}${alignr}Xubuntu 12.10${color} ${voffset 0}${alignr}${kernel} ${if_match ${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/can/ {print $1}'}>0}${offset 10}Updates Available:${alignr}${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/can/ {print $1}'} ${offset 10}Security Updates:${alignr}${execi 3600 /usr/lib/update-notifier/apt-check --human-readable | awk '/are/ {print $1}'} ${endif} ############################################################################################ # # # The second TEXT code block displays CPU information # # -> Temperature displayed is the PCI Adapter temp1 output on same line as 'high' output # # -> Requires the installation of lm-sensors to work: sudo apt-get lm-sensors # # -> After installation run: sensors-detect (answer yes to all) # # -> Run 'sensors' in terminal to determine which line needs grep & which columns # # needs to be cut. # # -> Replace: ${cpubar cpu1 5} with ${cpugraph cpu1 FFFF00 FF0000} to change to graph # # output of CPU1 usage. # # -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors # # you like. Goto www.graphviz.org/doc/info/colors.html for color information (hold # # mouse over color to see HEX code for that color). # # -> Add % use outputs for cores by adding the following line: # # Core '#': ${alignr}${cpu cpu'#'}% # # (repeat for each additional core up to the total number of cores in the system) # # (replace each '#' with the number of the core (i.e. 3 or 4)) # # # ############################################################################################ CPU${voffset -2}${alignr}[${if_match ${cpu cpu0} == 0}${color6}|||||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 5}${color5}|${color6}||||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 10}${color5}||${color6}|||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 15}${color5}|||${color6}||||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 20}${color5}||||${color6}|||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 25}${color5}|||||${color6}||||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 30}${color5}||||||${color6}|||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 35}${color5}|||||||${color6}||||||||||||||${color}${else}${if_match ${cpu cpu0} <= 40}${color5}||||||||${color6}|||||||||||||${color}${else}${if_match ${cpu cpu0} <= 45}${color5}|||||||||${color6}||||||||||||${color}${else}${if_match ${cpu cpu0} <= 50}${color5}||||||||||${color6}|||||||||||${color}${else}${if_match ${cpu cpu0} <= 55}${color5}|||||||||||${color6}||||||||||${color}${else}${if_match ${cpu cpu0} <= 60}${color5}|||||||||||${color4}|${color6}|||||||||${color}${else}${if_match ${cpu cpu0} <= 65}${color5}|||||||||||${color4}||${color6}||||||||${color}${else}${if_match ${cpu cpu0} <= 70}${color5}|||||||||||${color4}|||${color6}|||||||${color}${else}${if_match ${cpu cpu0} <= 75}${color5}|||||||||||${color4}||||${color6}||||||${color}${else}${if_match ${cpu cpu0} <= 80}${color5}|||||||||||${color4}|||||${color6}|||||${color}${else}${if_match ${cpu cpu0} <= 85}${color5}|||||||||||${color4}||||||${color6}||||${color}${else}${if_match ${cpu cpu0} <= 90}${color5}|||||||||||${color4}|||||||${color6}|||${color}${else}${if_match ${cpu cpu0} <= 95}${color5}|||||||||||${color4}|||||||${color3}|${color6}||${color}${else}${if_match ${cpu cpu0} < 100}${color5}|||||||||||${color4}|||||||${color3}||${color6}|${color}${else}${if_match ${cpu cpu0} == 100}${color5}|||||||||||${color4}|||||||${color3}|||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}] ${voffset 4}${offset 10}${top name 1}${alignr}${top cpu 1} ${offset 10}${top name 2}${alignr}${top cpu 2} ${offset 10}${top name 3}${alignr}${top cpu 3} ############################################################################################ # # # Third TEXT code block displays RAM information: # # -> Replace ${membar 10} with ${memgraph FFFF00 FF0000} to change to graph output of # # RAM usage. (I did not find this very useful as RAM usage is usually fairly steady # # on my sytem.) # # # ############################################################################################ RAM${voffset -2}${alignr}[${if_match ${memperc} == 0}${color6}|||||||||||||||||||||${color}${else}${if_match ${memperc} <= 5}${color5}|${color6}||||||||||||||||||||${color}${else}${if_match ${memperc} <= 10}${color5}||${color6}|||||||||||||||||||${color}${else}${if_match ${memperc} <= 15}${color5}|||${color6}||||||||||||||||||${color}${else}${if_match ${memperc} <= 20}${color5}||||${color6}|||||||||||||||||${color}${else}${if_match ${memperc} <= 25}${color5}|||||${color6}||||||||||||||||${color}${else}${if_match ${memperc} <= 30}${color5}||||||${color6}|||||||||||||||${color}${else}${if_match ${memperc} <= 35}${color5}|||||||${color6}||||||||||||||${color}${else}${if_match ${memperc} <= 40}${color5}||||||||${color6}|||||||||||||${color}${else}${if_match ${memperc} <= 45}${color5}|||||||||${color6}||||||||||||${color}${else}${if_match ${memperc} <= 50}${color5}||||||||||${color6}|||||||||||${color}${else}${if_match ${memperc} <= 55}${color5}|||||||||||${color6}||||||||||${color}${else}${if_match ${memperc} <= 60}${color5}|||||||||||${color4}|${color6}|||||||||${color}${else}${if_match ${memperc} <= 65}${color5}|||||||||||${color4}||${color6}||||||||${color}${else}${if_match ${memperc} <= 70}${color5}|||||||||||${color4}|||${color6}|||||||${color}${else}${if_match ${memperc} <= 75}${color5}|||||||||||${color4}||||${color6}||||||${color}${else}${if_match ${memperc} <= 80}${color5}|||||||||||${color4}|||||${color6}|||||${color}${else}${if_match ${memperc} <= 85}${color5}|||||||||||${color4}||||||${color6}||||${color}${else}${if_match ${memperc} <= 90}${color5}|||||||||||${color4}|||||||${color6}|||${color}${else}${if_match ${memperc} <= 95}${color5}|||||||||||${color4}|||||||${color3}|${color6}||${color}${else}${if_match ${memperc} < 100}${color5}|||||||||||${color4}|||||||${color3}||${color6}|${color}${else}${if_match ${memperc} == 100}${color5}|||||||||||${color4}|||||||${color3}|||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}] ${voffset 4}${offset 10}${top_mem name 1}${alignr}${top_mem mem 1} ${offset 10}${top_mem name 2}${alignr}${top_mem mem 2} ${offset 10}${top_mem name 3}${alignr}${top_mem mem 3} ############################################################################################ # # # Fourth TEXT code block displays Filesystem information: # # -> The USB information is specific to the USB drive settings on my computer (i.e. my # # 1st USB mounts at /dev/sdb1). Run 'df' in terminal to determine location of drives. # # -> To make conky display correctly the cut locations for sdb1, sdc1, sdd1, & sdc may # # need to be adjusted. # # # ############################################################################################ ${if_match ${swapperc} > 0} SWP ${color}${alignr}$swap/$swapmax ${else}${endif} HD ${alignr}${fs_used /} / ${fs_size /}${if_existing /dev/sdc1} ${execp df -H | grep 'sdc1' | cut -c56-66}:${alignr}${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}${else}${endif}${if_existing /dev/sdd1} ${execp df -H | grep 'sdd1' | cut -c56-66}:${alignr}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}${else}${endif}${if_existing /dev/sde1} ${execp df -H | grep 'sde1' | cut -c56-66}:${alignr}${execp df -H | awk '/sde1/ {print $3, "/", $2}'}${else}${endif} ############################################################################################ # # # Fith TEXT code block displays Network information: # # -> A graphical output of download information can be displayed by adding the following # # line of code: # # ${color2}${downspeedgraph wlan0 FFFF00 FF0000}${color} # # -> A graphical output of upload information can be displayed by adding the following # # line of code: # # ${color2}${upspeedgraph wlan0 FFFF00 FF0000}${color} # # -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors # # you like. Goto www.graphviz.org/doc/info/colors.html for color information (hold # # mouse over color to see HEX code for that color). ifconfig -a # # # ############################################################################################ Ethernet Private IP:${alignr}${addr eth0} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}d${outlinecolor}${font}${color} ${voffset -2}[${if_match ${downspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${downspeedf eth0} <= 19}${color5}|${color6}||||||||||${color}${else}${if_match ${downspeedf eth0} <= 38}${color5}||${color6}|||||||||${color}${else}${if_match ${downspeedf eth0} <= 58}${color5}|||${color6}||||||||${color}${else}${if_match ${downspeedf eth0} <= 77}${color5}||||${color6}|||||||${color}${else}${if_match ${downspeedf eth0} <= 96}${color5}|||||${color6}||||||${color}${else}${if_match ${downspeedf eth0} <= 115}${color5}||||||${color6}|||||${color}${else}${if_match ${downspeedf eth0} <= 134}${color5}|||||||${color6}||||${color}${else}${if_match ${downspeedf eth0} <= 154}${color5}||||||||${color6}|||${color}${else}${if_match ${downspeedf eth0} <= 173}${color5}|||||||||${color6}||${color}${else}${if_match ${downspeedf eth0} < 192}${color5}||||||||||${color6}|${color}${else}${if_match ${downspeedf eth0} >= 192}${color5}|||||||||||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}] ${alignr}${font}${totaldown eth0} ${outlinecolor black}${color1}${font Heydings Icons:bold:size=8}u${outlinecolor}${color}${font} ${voffset -2}[${if_match ${upspeedf eth0} == 0}${color6}|||||||||||${color}${else}${if_match ${upspeedf eth0} <= 4.8}${color5}|${color6}||||||||||${color}${else}${if_match ${upspeedf eth0} <= 9.6}${color5}||${color6}|||||||||${color}${else}${if_match ${upspeedf eth0} <= 14}${color5}|||${color6}||||||||${color}${else}${if_match ${upspeedf eth0} <= 19}${color5}||||${color6}|||||||${color}${else}${if_match ${upspeedf eth0} <= 24}${color5}|||||${color6}||||||${color}${else}${if_match ${upspeedf eth0} <= 29}${color5}||||||${color6}|||||${color}${else}${if_match ${upspeedf eth0} <= 34}${color5}|||||||${color6}||||${color}${else}${if_match ${upspeedf eth0} <= 38}${color5}||||||||${color6}|||${color}${else}${if_match ${upspeedf eth0} <= 43}${color5}|||||||||${color6}||${color}${else}${if_match ${upspeedf eth0} < 48}${color5}||||||||||${color6}|${color}${else}${if_match ${upspeedf eth0} >= 48}${color5}|||||||||||${color}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}] ${alignr}${font}${totalup eth0} ############################################################################################ # # # Sixth TEXT code block displays Music info from Pithos: # # -> Requires installation of pithos and php5-cli to run a php script # # http://kevinmehall.net/p/pithos/ # # sudo apt-get install php5-cli # # # ############################################################################################ ${if_empty ${exec pgrep pithos}}${else} Pithos ${color1}Song: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'title'} ${color1}Artist: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'artist'} ${color1}Album: ${color}${execp php ~/Documents/Conky/Main/pithos.php 'album'} ${endif} ############################################################################################ # # # Seventh TEXT code block displays a Calendar: # # -> Calendar requires use of a mono font for proper spacing of numbers and leters # # # ############################################################################################ ${execpi 600 date +"%B"} ${execpi 600 date +"%Y"}${alignr}${execpi 15 date +"%l:%M %p"} ${voffset -5}${color1}${hr 1}${color} ${font Monofonto:size=10}${execpi 600 DJS=`date +%_d`; cal -h | sed '1d' | sed s/"$DJS"'\b'/'${outlinecolor}${color1}'"$DJS"'${outlinecolor}${color}'/} ${voffset -20}${color1}${hr 1}${color}
Who's Awesome? You're Awesome.
Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU
Bookmarks