Home > linux > transparent conky background in fvwm-crystal+rox-filer

transparent conky background in fvwm-crystal+rox-filer


As you can see from the screenshot that I have finally managed to get a transparent conky background. Here is the script in my ~/bin directory


#!/usr/bin/python

#filename:set_conky_background.py


import xml.dom.minidom
import os

def main():
xmldom = xml.dom.minidom.parse(open(os.path.join(os.path.expanduser("~"), ".config/rox.sourceforge.net/ROX-Filer/pb_Default")))
xmlTag = xmldom.getElementsByTagName('backdrop')
#    print xmlTag[0].toxml()
property = xmlTag[0].attributes['style'].value
filename =  xmlTag[0].firstChild.data
command = ""
if property == "Centred":
command = "feh --bg-center " + filename
elif property == "Scaled":
command = "feh --bg-scale " + filename
elif property == "Fit":
command = "xsetbg -fullscreen " + filename
elif property == "Stretched":
command = "feh --bg-scale " + filename
elif property == "Tiled":
command = "xsetbg -tile " + filename

print command
os.system(command)



if __name__ == "__main__":
main()


=============
And add the following line to .fvwm-crsytal start up file

+ I Test (x /home/alind/bin/conky_background.sh) Exec pidof /home/alind/bin/set_conky_background.py || exec /home/alind/bin/set_conky_background.py

Only problem is that if u change background during a current session then u have to run once conky_background.sh from command line. Else it will automatically load the new wallpaper during next startup of fvwm. I will try to automate this also. The reasons for non-transparent background of conky was some fighting b/w conky, rox-filer to draw on root-window. This makes them both draw the same pic and what u get is the illusion of transparency.
cheers!

 

Categories: linux
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment