For quite some time, I have wanted to use conky on my Linux desktop. The screenshots were incredible. All the best looking and informative Linux desktops I have seen use it. But whenever I tried to follow the tutorials, the example config files produced terrible looking results. The config options were legion, and I just didn’t have the time to figure it out. So I stayed with SysMonitor.
Today, I took a few hours and played with the config. The results were a big improvement:
Two resources that were very helpful:
Caveat lector: You will have to read through the config file and make changes. You will still have to tweak for it to look decent. And this only makes sense, as you are presenting a lot of individual information in a tight but varying space. Hopefully you don’t have to tweak more than you should, however.
You will need to copy the code below into ~/.conkyrc. Then create a folder ~/scripts, and place some weather scripts and an RSS script in it (fix the references to the author’s home folder in both scripts). Then run: “conky &”. You can add this to your session if you want it to come up at boot.
Things you’ll likely need to customize:
- Network interface might need to be something other than eth0; do a global replace in .conkyrc.
- Your disk setup will almost certainly be different. Change the /dev/XXX references to whatever you need.
- Set your local zip code in the weather script.
- Change the security headlines and news headlines to anything you want to keep track of.
While the config can be quite complex, this is the most complete and configurable desktop information monitoring system I have ever come across. With a few tweaks to a good foundation, you can present a tremendous amount of useful information in a small portion of your display.
My .conkyrc:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | # Conky configuration # # Variable definitions: # Check http://conky.sf.net for an up-to-date-list. ################################# # 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 sans:size=7 # 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 yes # If own_window is yes, you may use type normal, desktop or override own_window_type override # Use pseudo transparency with own_window? #own_window_transparent yes # If own_window_transparent is set to no, you can set the background colour here own_window_colour black # If own_window is yes, these window manager hints may be used 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 150 # Maximum size of text area maximum_width 300 # Draw shades? draw_shades no # Draw outlines? draw_outline no # makes text too bold if yes # Draw borders around text draw_borders no # Draw borders around graphs draw_graph_borders no # Stippled borders? stippled_borders 8 # border margins border_margin 4 # border width border_width 1 # Default colors and also border colors default_shade_color black default_outline_color black # Alignment of conky window; other possible values are commented alignment top_left #alignment top_right #alignment bottom_left #alignment bottom_right #alignment none # Gap between borders of screen and text # same thing as passing -x at command line gap_x 10 gap_y 35 # 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 no # Add spaces to keep things from moving about? This only affects certain objects. #use_spacer no # # TEXT TO SHOW: # # 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 TEXT ${color yellow}SYSTEM INFORMATION ${color}${pre_exec whoami} @ $nodename: $sysname, $kernel on $machine ${pre_exec sudo dmidecode --type baseboard | grep 'Product' | cut -d' ' -f3-} by ${pre_exec sudo dmidecode --type baseboard | grep 'Manufacturer' | cut -d' ' -f2-} ${color orange}Overview${hr 2}${color} Uptime:${color} $uptime ${color} - Load:${color} $loadavg CPU(s) : ${pre_exec cat /proc/cpuinfo | grep 'model name' | cut -d' ' -f3-} ${color} CPU Usage:${color} $cpu% ${cpubar} ${color} ${cpugraph 0000ff 00ec00} ${color} RAM Usage:${color} $mem/$memmax - $memperc% ${membar} ${color} ${memgraph 0000ff 00ec00} ${color} Swap Usage:${color} $swap/$swapmax - $swapperc% ${swapbar} ${color} Processes:${color} $processes ${color} Running:${color} $running_processes ${color orange}Disks:${hr 2}${color} ${color} /dev/sdb1 ${color}(${fs_type /}) /: ${alignr} /dev/sda1 ${color}(${fs_type /home}) /home: ${fs_used /} used of ${fs_size /} ${alignr} ${fs_used /home} used of ${fs_size /home} Disk I/O - ${diskio /dev/sdb1} ${alignr} Disk I/O - ${diskio /dev/sda1} ${diskiograph /dev/sdb1 35,130 ff0000 0000ec} ${alignr} ${diskiograph /dev/sda1 35,130 ff0000 0000ec} ${color orange}Processes by CPU usage${hr 2}${color} ${color} Name ${alignr} PID CPU% MEM% ${color #ec0000} ${top name 1} ${alignr} ${top pid 1} ${top cpu 1} ${top mem 1} ${color} ${top name 2} ${alignr} ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} ${alignr} ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} ${alignr} ${top pid 4} ${top cpu 4} ${top mem 4} ${color orange}Processes by mem usage${hr 2}${color} ${color} Name ${alignr} PID CPU% MEM% ${color #ec0000} ${top_mem name 1} ${alignr} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1} ${color} ${top_mem name 2} ${alignr} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2} ${top_mem name 3} ${alignr} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3} ${top_mem name 4} ${alignr} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4} ${color orange}Networking:${hr 2}${color} IP: ${addr eth0} Gateway: ${gw_ip eth0} Down:${color} ${downspeed eth0} k/s${color} ${alignr}Up:${color} ${upspeed eth0} k/s ${color}${downspeedgraph eth0 35,130 ff0000 0000ec}${alignr}${upspeedgraph eth0 35,130 0000ff ec0000} Connections in:${color} ${tcp_portmon 1 32767 count}${color} Connections out:${color} ${tcp_portmon 32768 61000 count}${color} Total:${color} ${tcp_portmon 1 65535 count} ${color} Inbound Connection ${alignr} Local Service/Port ${color} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0} ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1} ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2} ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3} ${color} Outbound Connection ${alignr} Remote Service/Port${color} ${color} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0} ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1} ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2} ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3} ${color orange}syslog${hr 2}${color} ${execi 30 tail -n3 /var/log/messages | fold -w50} ${color orange}Local Weather:${hr 2}${color} ${color #7f8ed3}${execi 1800 ~/scripts/weather/weather.sh 21401} ${color orange}Ubuntu Security Advisories:${hr 2}${color} ${color #7f8ed3}${execi 300 ~/scripts/conky-rss.sh http://www.ubuntu.com/taxonomy/term/2/0/feed 5 1} ${color orange}News headlines${hr 2}:${color} ${color #7f8ed3}${execi 300 ~/scripts/conky-rss.sh http://rss.slashdot.org/Slashdot/slashdot 5 2} ${color orange}FORTUNE ${hr 2}${color} ${execi 120 fortune -s | fold -w50} ${hr} Provided by: Conky (${conky_version}) |
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.










Awesome post – had it up and running in about 20 min.
I “cheated” and used “sudo apt-get install conky” on my Intrepid Ibex install, instead of building from scratch.
That’s not cheating, that’s the right way to do it:-) No reason to build from scratch unless you need the bleeding edge version or need to compile something in.
Glad this helped get things working! You should post a screenshot somewhere, show off the goods.
I have read all the articles. Very useful information was written. Thanks