Comment 6 for bug 1085388

Revision history for this message
Peter Levi (peterlevi) wrote :

Hi,

First off let me say thanks for writing such a great program! I've been using variety for some time now and think it's brilliant, the only wallpaper changer worth having IMHO! :)

I am currently running Arch Linux (64bit) with XFCE, but recently I decided to try out a few different DEs such as Razor-QT, LXQT and Enlightenment (which I built from the new E18 source available on their website).

I liked E18 and decided to try it our as my main DE for a while, but I noticed that Variety wasn't working so I started investigating to see if I could figure out why and if / how it would be possible to make it function for E.

After a bit of 'Googling' I found several forum posts and 'bug tracking' items relating to Variety not functioning for E17/E18, but I also found a project on GitHub called Krawall -- https://github.com/X4/krawall

This had some code for Enlightenment's `edje_cc` function which can convert images to the format necessary to work as a wallpaper for E.
-- the code itself had a note above it saying:
# forked from: https://gist.github.com/rumia/4565562#file-imgtoedj-sh-L8

As far as I can tell the `edje_cc` function is built as part of E18 and should (in theory) be available to anyone running the E-DE. I had to customise the code I borrowed from Krawall to some extent and I've added it to a new section in Variety's `set_desktop` script file (see attached).

Note: I have Variety configured to only use local images (no web services/downloads or quotes) but I do have the clock enabled, so Variety updates the wallpaper image every minute -- I can't remember if there's a "show seconds" option but I'm guessing if so then the wallpaper would be updated every second?! ...anyway...

So every time the clock changes Variety updates the current WP image, which also applies a new file-name. This meant that I ended up with a new '.edj' file (i.e. with a new name) being generated every minute. To solve this problem I decided to use the same method Variety uses for KDE, to have a fixed output file-name so it just overwrites the same image file over and over again.

However...I also discovered that the code I borrowed from Krawall actually unsets / deletes the old wallpaper before adding the new one, which (for me at least) created an annoying 'blink' effect while the wallpapers were changed. -- I guess because there was briefly no wallpaper at all. Although I also found that if other images had already been added via E's wallpaper manager (or other '.edj' files existed in the folder) then one of these 'blinked' instead.

In the end (and after much testing) I decided to use a 'tick-tock' method and have two output files and just alternate between them. The transition now appears smooth and everything seems to work fine.

==> Please note that although I used to be a Web Developer I'm not really up on my BASH scripting or other programming and/or Linux based code 'hacking' <==

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, of the two attached files the `set_wallpaper.1st` represents my first attempt, which suffered from the blinking effect, whilst the other is the updated and (hopefully) fully functioning one.

---- I'm really sorry for such a long email but I wanted to explain thoroughly ----

There's just one more thing I would like to mention...

Whilst I have been writing this email I actually just realised that I should have used the 'original source' parameter ($3) from Variety for the output file-name in the script. This would effectively import each new image in to E's WP folder in the correct format (as was my original plan before I discovered the new file-name every minute 'bug' -- my error). This would avoid generating a new file-name every time the clock updates and it would also mean that names would be more descriptive (i.e. maintain the original source file's name!) -- however updating the single file would probably still result in the blinking effect I described, so...

Perhaps when it is the same image (i.e. just the clock updating) I could copy the 'old' WP to a temporary file and set that as the active WP then save the new/updated WP over the original, set _that_ as active and then delete the temporary file?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm so sorry if this is all a bit of a ramble, you can tell I'm not a professional!
...but hey if it helps then I'd be pretty happy about it, I've never contributed to an open-source project before!

Please do get in touch if you need anything clarified and/or have suggestions.
-- also please note that I haven't really tested in this in any other way other than on my own system, and not on any other distro! Perhaps this is something the OS community can help with?

Kind regards,

Chris