E17 and fake transparency

Posted on Sun 16 March 2008 in Technology • 2 min read

E17 stores the background images in edje file format. Edje (*.edj) is a binary file format which compresses the images quite a bit and has many additional features (animations, layers etc.). Creating an animated background for e17 is quite easy (check here). There is already the wallpaper module in e17 which can set the current wallpaper to any image.

What if we want to write a cron job to switch the wallpapers (think slideshow module?). Adding a bit more complexity to it : e17 doesn’t like fake transparency and may not change its mind in near future (source) and our terminals(mrxvt?)/system tray(stalonetray) need fake transparency. There’s a nifty hack called Esetroot which sets fake transparency but doesn’t change the e17 background.

Even there’s a way to achieve both : Install the e_utils package and photo module. Right click on any image in photo module and you can set it as your background.Actually the photo module calls e17setroot program in e_utils and sets the background and then calls Esetroot to set fake transparency. If you already have e_utils up and running, you don’t need to read further :)

A script to emulate e17setroot

  • Get the files : e17setroot and edc_skeleton
  • Put e17setroot in \$PATH (e.g: in \~/bin) and change the line #31 to the location of edc_skeleton file
  • To set your wallpaper use e17setroot null /path/to/image/file

How this works ?

The main script e17setroot uses edje_cc to create the edj file. Edje (edje_cc) in fact needs an .edc file which contains few parameters to create the edj file. Our script takes the skeleton of an .edc and replaces the image name. And the resulting edj is placed in the \~/.e/e/backgrounds directory.

/me leaves the use of e17setroot to /reader’s creativity