Easy to use random wallpaper changer
Now I know for sure - I'm a code junkie...
I started to play with Stifiling's scripts and RWC...and I wasn't able to stop until finished!
So here it is: RWC-1.6.
The "Local" part is unchanged and should work as usual, but there's new part: Online.
I've applied Sifiling's 'googleimages' idea.
How it works:
- You can put a search query, but, let's say, don't expect miracles, ok?
- RWC automatically determines screen resolution, but if you have some strange one, like 481x924 it's better to set something more usual like 800x600 or eventually 0x0.
- If internet connection is lost, RWC switches to Local mode, but when connection is restored, RWC switches back to Online mode.
Known issues:
- Sometimes downloaded pictures are "broken" (eg. site doesn't allow do get it via wget, I guess?).
In this case RWC tries to download another (max. 5 times), but it fails anyway from time to time.
- Now requires Gtkdialog >= 0.8.0
Sorry, but I have no strenght to test if it still works correctly in other Puppies than Slacko 5.3.3, Carolina and Lupu-528, hope it does.
OK, now I really need to take a longer break.
PS. Thanks again for the idea and code, Stifiling.
_________________________________
EDIT: I've added also InterfaceLift site in version 1.6.1:
- If you enter specific data into Query and Resolution fields - "google.images.com" will be in use (random pictures based on chosen query and resolution).
- If you enter * (asterisk) into any of fields - "interfacelift.com" will be in use then (random wallpapers in HD resolution).
Also corrected 'search query' routine - it's a bit more accurate now.
Enjoy & Greetings!
I started to play with Stifiling's scripts and RWC...and I wasn't able to stop until finished!
So here it is: RWC-1.6.
The "Local" part is unchanged and should work as usual, but there's new part: Online.
I've applied Sifiling's 'googleimages' idea.
How it works:
- You can put a search query, but, let's say, don't expect miracles, ok?
- RWC automatically determines screen resolution, but if you have some strange one, like 481x924 it's better to set something more usual like 800x600 or eventually 0x0.
- If internet connection is lost, RWC switches to Local mode, but when connection is restored, RWC switches back to Online mode.
Known issues:
- Sometimes downloaded pictures are "broken" (eg. site doesn't allow do get it via wget, I guess?).
In this case RWC tries to download another (max. 5 times), but it fails anyway from time to time.
- Now requires Gtkdialog >= 0.8.0
Sorry, but I have no strenght to test if it still works correctly in other Puppies than Slacko 5.3.3, Carolina and Lupu-528, hope it does.
OK, now I really need to take a longer break.
PS. Thanks again for the idea and code, Stifiling.
_________________________________
EDIT: I've added also InterfaceLift site in version 1.6.1:
- If you enter specific data into Query and Resolution fields - "google.images.com" will be in use (random pictures based on chosen query and resolution).
- If you enter * (asterisk) into any of fields - "interfacelift.com" will be in use then (random wallpapers in HD resolution).
Also corrected 'search query' routine - it's a bit more accurate now.
Enjoy & Greetings!
- Attachments
-
- RWC-1.6.1.pet
- RWC-1.6.1; added InterfaceLift + small correction of 'search query' routine
- (5.06 KiB) Downloaded 948 times
-
- RWC-1.6.png
- Screenshot
- (31.01 KiB) Downloaded 1123 times
-
- RWC-1.6.pet
- RWC-1.6
- (4.69 KiB) Downloaded 921 times
Last edited by SFR on Thu 18 Oct 2012, 12:05, edited 1 time in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Hey thanks for that SFC. just one last thing i want to say and that is.....it would appear as though the googleimages would be the best of the scripts. but based on my history with using them, the interfacelift.com script is really the best. it doesn't freeze sometimes like the google one does...it seems to randomize better...(for one reason or another the google one tends to duplicate more often), and also.....the wallpapers are plentiful and tend to be more beautiful and more like 'real' wallpapers.
i wish i had said these things before u rewrote the app. but i do think...u'd like the ifl one better.
Good job though...the new RWC looks really nice.
i wish i had said these things before u rewrote the app. but i do think...u'd like the ifl one better.
Good job though...the new RWC looks really nice.
Sorry, I did not test RWC, but, yes, rhadon's WallRefresh is great.SFR wrote:@Stifiling & Rmcellig
Anyway, I don't know if you guys are aware of this, but there's also Rhadon's Wallrefresh app very related to the subject.
I'm currently online from the Computer i do use in my drumming room. WallRefresh is already installed in LazY Puppy.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Hi mcellig.
The background is Wallrefresh Online Wallpaper ---> Stockholm.
On the bottom is wbar, that's right. But it's an old version, Actually a modified version of 1.3.3 with setup.
The Icons on the right are the usual drive icons. I did set them to the right side in /etc/eventmanager.
The icon theme is my personal edition of the faenza icon set.
---
I have put a script into LazY Puppy that makes symbolic links from /usr/share/pixmaps, from /usr/local/lib/X11/pixmaps and some other paths to the wbar icon directory in /usr/share/wbar/wbar.icons - so, i can use all those icons in wbar. If I do switch the icon theme the wbar icons do change also this way.
The background is Wallrefresh Online Wallpaper ---> Stockholm.
On the bottom is wbar, that's right. But it's an old version, Actually a modified version of 1.3.3 with setup.
The Icons on the right are the usual drive icons. I did set them to the right side in /etc/eventmanager.
Code: Select all
#left, right, bottom, or top of screen...
ICON_PLACE_ORIENTATION='right'
---
I have put a script into LazY Puppy that makes symbolic links from /usr/share/pixmaps, from /usr/local/lib/X11/pixmaps and some other paths to the wbar icon directory in /usr/share/wbar/wbar.icons - so, i can use all those icons in wbar. If I do switch the icon theme the wbar icons do change also this way.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Hey Stifilingstifiling wrote:Hey thanks for that SFC. just one last thing i want to say and that is.....it would appear as though the googleimages would be the best of the scripts. but based on my history with using them, the interfacelift.com script is really the best. it doesn't freeze sometimes like the google one does...it seems to randomize better...(for one reason or another the google one tends to duplicate more often), and also.....the wallpapers are plentiful and tend to be more beautiful and more like 'real' wallpapers.
i wish i had said these things before u rewrote the app. but i do think...u'd like the ifl one better.
Good job though...the new RWC looks really nice.
The problem with InterfaceLift is it seems that categories as well as resolutions are 'hard-coded', that's why I've chosen googleimages, which gives more...err...freedom..?
For instance, one can choose "cat+sweet+fluffy" or "thermonuclear+explosion+mayhem" in any resolution and he/she'll get, more or less of course, what was expected.
But it's not a big problem really, I've resolved that this way:
If user enters * into 'Search query' and/or 'Resolution' field - then InterfaceLift will be in use; otherwise - GoogleImages.
Fair enough, I think?
I've attached v1.6.1 to my previous post.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Update, version 1.6.2:
Bugfix: possible corruption of pinboard wallpaper when RWC/computer is turned off during downloading.
Added: 'Safe Search' checkbox; until now 'safe search' was "on" by default.
Greetings!
Bugfix: possible corruption of pinboard wallpaper when RWC/computer is turned off during downloading.
Added: 'Safe Search' checkbox; until now 'safe search' was "on" by default.
Greetings!
- Attachments
-
- RWC-1.6.2.png
- Screenshot
- (29.3 KiB) Downloaded 1154 times
-
- RWC-1.6.2.pet
- Random Wallpaper Changer v1.6.2
- (5.17 KiB) Downloaded 810 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Hard to say.rmcellig wrote:For the look inside sub folders option. How many folders deep does it go?
I just created 100 nested subfolders and RWC still finds pictures saved in the deepest one...
You can try by yourself:
Code: Select all
for i in {1..100}; do mkdir "test-$i"; cd "test-$i"; done; cp /usr/share/backgrounds/* .
It depends more on Linux/Kernel limitations than RWC, I think.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Hi SFR,
I am testing on Akita, which doesn't use the ROX pinboard by default,
so ROX pops up an error msg when the pinboard is first enabled by RWC,
and a default pinboard instance is started, with only the default Home icon visible...
But of course this doesn't happen if the ROX pinboard is already running...
Anyway, the above problem is not really anything to do with your app,
just what happens when ROX is not already running, but it brings me to the question...
Would it be possible (if you're even interested) to make this app use feh to set the wallpaper?
Akita uses feh when the ROX pinboard is not active.. It builds and runs another script. Example of the generated script below:
I would be more than happy to get feh working with RWC myself,
but wondered if you had any known caveats, thoughts or suggestions, etc...
If not, then don't worry... Cheers.
EDIT: I added the following to /usr/local/RWC/rwc-main:
EDIT2: changed Center to Centre below...
(not tested much at all...)
Agreed, in my brief tests (so far) it works nicely...rmcellig wrote:Looks good!! You are doing amazingly well with this app.
I am testing on Akita, which doesn't use the ROX pinboard by default,
so ROX pops up an error msg when the pinboard is first enabled by RWC,
and a default pinboard instance is started, with only the default Home icon visible...
But of course this doesn't happen if the ROX pinboard is already running...
Anyway, the above problem is not really anything to do with your app,
just what happens when ROX is not already running, but it brings me to the question...
Would it be possible (if you're even interested) to make this app use feh to set the wallpaper?
Akita uses feh when the ROX pinboard is not active.. It builds and runs another script. Example of the generated script below:
Code: Select all
#!/bin/ash
[ -x /usr/bin/feh ] && /usr/bin/feh --no-menus --bg-fill "/usr/share/backgrounds/akita.jpg"
exit
but wondered if you had any known caveats, thoughts or suggestions, etc...
If not, then don't worry... Cheers.
EDIT: I added the following to /usr/local/RWC/rwc-main:
EDIT2: changed Center to Centre below...
(not tested much at all...)
Code: Select all
#261012 added support for feh, use it if present (it's prob not)
case $ROX_STYLE in
Centre) FEH_STYLE='--bg-center' ;;
Stretch) FEH_STYLE='--bg-fill' ;;
Max) FEH_STYLE='--bg-max' ;;
Scale) FEH_STYLE='--bg-scale' ;;
Tile) FEH_STYLE='--bg-tile' ;;
*) FEH_STYLE='--bg-scale' ;;
esac
[ "`which feh`" != "" ] && feh --no-menus ${FEH_STYLE} "$WALLPAPER" || {
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
<env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
<SetBackdrop>
<Filename>$WALLPAPER</Filename>
<Style>$ROX_STYLE</Style>
</SetBackdrop>
</env:Body> </env:Envelope>
EOF
}
Last edited by sc0ttman on Fri 26 Oct 2012, 18:15, edited 2 times in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Hey Scottman
It will be enough to modify main 'if..else..fi' condition in the mentioned script.
I'll download Akita and see how to best adapt RWC to it, but if you'll be the first, just let me know, so I'll include it.
Greetings!
I think it would . It's just a matter of modifying rwc-main script - it checks if XFCE is the default WM (cat /etc/windowmanager | grep xfce), if not - ROX is set as default.Would it be possible (if you're even interested) to make this app use feh to set the wallpaper?
It will be enough to modify main 'if..else..fi' condition in the mentioned script.
I'll download Akita and see how to best adapt RWC to it, but if you'll be the first, just let me know, so I'll include it.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Hi SFR... I just saw your reply after I edited my post, sorry....SFR wrote:Hey Scottman
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
No problem, thanks for feh style definitions!
I'll test it a bit and upload new version in a few days.
Greetings!
I'll test it a bit and upload new version in a few days.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Ok, I'm natural born pessimist - I meant "hours" of course.SFR wrote:I'll test it a bit and upload new version in a few days.
@ Sc0ttman:
I've done it in a bit different way:
Code: Select all
if [ `which feh` ] && [ ! "`xwininfo -root -tree | grep 'ROX-Pinboard'`" ]; then
...
(phew, it took me a while to find out "how to determine if pinboard is in use or not", btw)
So, RWC now works with Akita's default configuration (feh), but if user decides to use pinboard, it works aswell.
Also, Akita has different output of xrandr, so I've added small modification and current resolution should be recognized correctly now.
PS. I didn't test it "exhaustively", but everything seems to work fine so far; couldn't find any flaw...but future will tell.
Greetings!
- Attachments
-
- RWC-1.6.3.pet
- RWC-1.6.3; now compatible with Akita
- (5.33 KiB) Downloaded 765 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Thanks, thats great.. Just a quick question, what am I supposed to do when I get the 'only 1 instance' popup msg, to get the GUI to load again? (Aside from killing it manually - I'm thinking of noobs and novices...)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Yes, I just noticed that it happens from time to time in Akita (although never happend in Slacko).
Surprisingly the addition of sleep 0.3 right before this line:
at the beginning of rwc-config script seems to "resolve" the problem.
But I'm not sure, because it happens very, very rare for me...
Please check out if it's ok for you too, so I'll upload corrected version tomorrow.
Also, perhaps a lower value of 'sleep' will work aswell..?
Thanks for noticing this, btw.
Greetings!
Surprisingly the addition of sleep 0.3 right before this line:
Code: Select all
[ `pidof rwc-config | wc -w` -gt "2" ] && xmessage -bg red -center -title "RWC Error" "Only one instace of RWC allowed!" && exit 1
But I'm not sure, because it happens very, very rare for me...
Please check out if it's ok for you too, so I'll upload corrected version tomorrow.
Also, perhaps a lower value of 'sleep' will work aswell..?
Thanks for noticing this, btw.
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
@Sc0ttman:
I _think_ I found the actual bug, it was /usr/bin/rwc-config:
I've no idea why did I put & there, but for 90% it was the cause; most likely /usr/bin/rwc-config process was dying too slow. Interesting that it wasn't happend in Slacko..?
But thanks again, it was definitely RWC bug.
I hope it'll be ok now.
__________________________
I've also added experimental support for LXDE (tested only on LXPup).
__________________________
Since all versions are scattered in different places in this thread, quick summary of supported DEs:
- XFCE
- ROX
- ROX (without pinboard, but with 'feh' as wallpaper setter)
- LXDE (experimental)
EDIT: tiny bugfix in detecting current resolution; if it works for you, ignore it. Reuploaded after 5 downloads.
Greetings!
I _think_ I found the actual bug, it was /usr/bin/rwc-config:
Code: Select all
exec /usr/local/RWC/rwc-config &
But thanks again, it was definitely RWC bug.
I hope it'll be ok now.
__________________________
I've also added experimental support for LXDE (tested only on LXPup).
__________________________
Since all versions are scattered in different places in this thread, quick summary of supported DEs:
- XFCE
- ROX
- ROX (without pinboard, but with 'feh' as wallpaper setter)
- LXDE (experimental)
EDIT: tiny bugfix in detecting current resolution; if it works for you, ignore it. Reuploaded after 5 downloads.
Greetings!
- Attachments
-
- RWC-1.6.4.pet
- Random Wallpaper Changer
- (5.59 KiB) Downloaded 780 times
Last edited by SFR on Sat 27 Oct 2012, 18:34, edited 1 time in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]