Wednesday, November 25, 2009

KDE 4.3 and Conky

While using Conky ( with KDE 4.3 There is a background problem, instead of transparent background the Conky seems to have a black background which hide the actual desktop.
The problem is that KDE draw the wallpaper on the plasma desktop instead of the root window, When Conky try to get the background from the root window, It only get the black color.
To fix this, We can use the "feh" command which can set the background image to a specific file.
What I'm having now is the following script:
#! /bin/bash
feh --bg-scale `grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | tail --bytes=+11`
sleep 15
conky -&

Some explanation:
The `grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | tail --bytes=+11` command will get the current desktop picture file name.
feh --bg-scale Is used to set the background image using a file name.

And then we can call Conky (The sleep 15 is for use this script during the KDE start up,this way we make sure the desktop is up before we are trying to show the Conky output on the screen).


No comments: