Ever wondered how to make conky stay on top, so even maximized windows do not cover it up? Here is a neat trick.
Summary:
1. Position conky at the top, horizontally aligned to center.
2. Overlay fbpanel on top of conky.
3. Use compiz to adjust fbpanel's transparency so it lets you see through making conky visible.
fbpanel is, well, a panel and therefore maximized windows do not cover it up. The transparent panel protects conky from being hidden by other application windows including the maximized ones.
I chose fbpanel as I find it to be the lightest among the lightweight panels - implemented in C/GTK.
1. Install required packages:
Code:
sudo apt-get update
sudo apt-get install fbpanel compizconfig-settings-manager
2. Create a blank fbpanel profile.
Code:
gedit ~/.fbpanel/default
Copy paste the below contents, Save & Exit gedit.
Code:
Global {
edge = top
allign = center
margin = 0
widthtype = percent
width = 70
heighttype = pixel
height = 22
roundcorners = false
transparent = false
tintcolor = #ffffff
alpha = 75
}
3. I use the following conkyrc file, so that it appears at the top, spread out horizontally, as shown in the screenshot below. (As you can see, a terminal window covers it partially, which we will fix in a moment)
Code:
background yes
use_xft yes
xftfont denmark:size=7
xftalpha 0.8
out_to_console no
update_interval 3.0
total_run_times 0
draw_shades no
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
minimum_size 1250
maximum_width 1250
double_buffer yes
default_color 482C16
color1 DDBBAA
alignment top_middle
gap_y 5
no_buffers yes
TEXT
${color}KERNEL: ${color1}$kernel ${color}UPTIME: ${color1}$uptime ${color}CPU: ${color1}${cpu cpu0}% - ${freq}MHz - ${acpitemp} deg. ${color}RAM: ${color1}${mem} - $memperc% ${color}SWAP: ${color1}${swap} - $swapperc% ${color} DISK: /home ${color1}${fs_free /home} free ${color}/ ${color1}${fs_free /} free ${color}NETWORK: ${color1} ${wireless_essid eth1} (${wireless_link_qual_perc eth1}%) - ${downspeed eth1} kb/s down - ${totaldown eth1} total / ${color1}${upspeed eth1} kb/s up - ${totalup eth1} total
4. Open a terminal window and enter fbpanel. This will launch fbpanel and position it at the top.It would completely hide conky behind, as in the screenshot below. Notice the terminal window pushed down a bit!
5. Now open CCSM (System -> Preferences -> CompizConfig Settings Manager). Enable the Opacity, Brightness and Saturation plugin. Select the plugin, under Opacity tab, Window Specific settings, click New. Enter fbpanel for 'Windows' and 0 for 'values'.
Watch conky emerging from behind and standing out and on top of all windows as shown in the screenshots below.
6. If everything turns out well, add conky and fbpanel to System -> Preferences -> Startup Applications. I use the the following script for this:
Code:
#! /bin/bash
sleep 15 && /usr/bin/conky && sleep 2 && /usr/bin/fbpanel
NOTE: The above startup order is important. If fbpanel starts up first, conky will get pushed down below.
7. If you do not want compiz to draw shadows for conky, you may turn it off from CCSM -> Window Decoration. Under Shadow window, enter:
Code:
(any) & !class=Conky
Have fun.
- Keerthi
Bookmarks