This page introduces two methods of adding transparency to the light weight Conky desktop information monitor, and concludes with some hints on completing the look of Conky on the desktop.
The first approach uses the 'root desktop', the second (shorter) method uses 'argb' but requires the use of Ecomorph or other compositing to work.
If you want transparency in your conky, you can get it by utilizing your root desktop. That means your root desktop needs to have a copy of your personal desktop as it's wallpaper. It's not a big deal.
There are several programs that will set your root desktop wallpaper but I find using Eterm about as easy as it gets and leave a small footprint.
Do this…
1. Install the application “Eterm” either with your Synaptic Package Manager or type the following in your terminal:
sudo apt-get install eterm
Eterm automatically comes with a program called Esetroot. Esetroot will set wallpaper of your root desktop when called in a terminal, or as we will do here, at computer startup.
2. Take a screen shot of your desktop and save it somewhere as a .jpg or .png file.
3. Make a .desktop file that calls Esetroot. Start a text editor and paste the following to it:
[Desktop Entry] Name=setrootback Comment=Sets the root background for Conky Exec=/usr/bin/Esetroot storage/rootback.png Icon=false NoDisplay=false Terminal=false Type=Application Categories= StartupNotify=true
Notice the “Exec=” directive. The section that says “storage/rootback.png” needs to match the location of the screen shot you just made and it's name. You can call it setrootback.desktop if you wish. If you're not using your text editor as root, then save it somewhere in your home files then move it as root to ”/usr/share/applications/”:
sudo mv [directory]/setrootback.desktop /usr/share/applications/
If your test editor is in root then just save it to the above directory.
Now when you load Bodhi, it will set your root desktop to that screen shot. When you start conky and the conky.conf transparency is set correctly, your conky display will be transparent.
There are many ways to set your conky configuration but for the manner of this wiki, the following conky configuration does work. You can look through it and see what the display directives are and make sure your own conky configuration has similar settings. I.E. double_buffer=yes, the “own_window” settings can be very important.
total_run_times 0
alignment top_right
background no
border_width 1
cpu_avg_samples 2
default_color 88ffff
default_outline_color 88ffff
default_shade_color 88ffff
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=9
gap_x 5
gap_y 60
minimum_size 5 10
net_avg_samples 2
no_buffers no
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
double_buffer yes
use_spacer right
TEXT
# ${scroll 16 $nodename - $sysname $kernel on $machine | }
${voffset 5}${color 88ffff}${font Ubuntu:size=14}TIME [ ${time %Y} ]${color 88ffff} ${hr 2}${color}
# ${alignc 30}${font Ubuntu:size=24}${time %I:%M:%S:%p}${font}
${alignc 20}${color 88ffff}${font Ubuntu:size=24}${time %H:%M:%S}${font}
${alignc -8}${time %A %B %d}
${font}
${color 88ffff}$hr
${color 88ffff}Uptime:$color $uptime
${color 88ffff}Frequency (in MHz):$color $freq
${color 88ffff}Frequency (in GHz):$color $freq_g
${color 88ffff}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color 88ffff}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color 88ffff}CPU Usage:$color $cpu% ${cpubar 4}
${color 88ffff}Processes:$color $processes ${color 88ffff}Running:$color $running_processes
${color red}${font DejaVu Sans:size=9}CPU temp: ${hwmon 0 temp 1}°C${color}
$hr
${color 88ffff}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color 88ffff}Networking:
Up:$color ${upspeed eth0} ${color 88ffff} - Down:$color ${downspeed eth0}
$hr
Put your conky.conf in /etc/conky/.
To make your conky start at boot, you need to make a .desktop file for that as well and put it in Startup Apps.
[Desktop Entry] Name=conky Comment=Starts conky at boot Exec=/usr/bin/conky Icon=false NoDisplay=false Terminal=false Type=Application Categories= StartupNotify=true
Put this also in /usr/share/applications/ just as the one before.
Now, go to Settings→Settings Panel→Apps→Startup Applications, find your file “conky” and add it.
That should do the job! There are other more advanced ways of getting transparency to your desktop, but I will leave that for another author. This is just a way to get you there quickly and easily using simulated transparency which is what most gui software use.
Note: This probably only works if you have compositing or Ecomorph enabled.
This solution relies on enabling ARGB Transparency (also called “True Transparency” or “Alpha Blending”) in conky. Edit your .conkyrc (or whatever you call your conky configuration) to include the following line:
own_window_argb_visual yes
This should make conky transparent even on the most complex animated backgrounds.
There is a useful page on the Bodhi Forums at:- http://forums.bodhilinux.com/index.php?/topic/277-solved-adding-conky-to-enlightenment-desktop/
'Timmy' posts this expansion of the above code which works well on a number of systems:
own_window yes own_window_argb_visual true own_window_argb_value 0 own_window_type desktop own_window_transparent yes
It is essential to remove (or comment out) any conflicting own_window commands!
If you have Ecomorph enabled, disabling the drop shadows on only the conky window is fairly simple.
In the Ecomorph configuration (Menu > Settings > Ecomorph), go to “Drop Shadow” on the left hand pane. On the right hand pane, for the normal shadow (top half), edit that line to include:
& !(class=Conky)
For example:
(type=any & !(type=dropdownmenu|popupmenu) & !(class=Conky))
Note: The class is case sensitive and so “Conky” is not the same as “conky” or “coNky.”
Original wiki by Martin Thompson March 2011
If you would like to comment or make further suggestions, please leave a note on our Comments page (you will have to Create an Account if you haven't already).