icewm
icewm copied to clipboard
[Feature request] Easily setting the image background / wallpaper, for icewm
Hey icewm devs,
First, please feel free to close this issue at any moment in time - some projects prefer to keep the issue requests clean, or focus on fixing bugs, which is totally understandable.
Next - I do not imply to necessarily suggest that the current dev team implements this suggestion, mind you. Although this may be fine, I am more interested in getting the opinions of the feature suggestion, pro, con or neutral.
Now without further ado, to the core of this suggestion:
- It is proposed that icewm adds a convenient "live" way to set the main background image/wallpaper, for a running instance of icewm.
Background and explanation:
I read the manpage for icewmbg, how to set the background image. I admit that my noobness led me to failure, and I gave up on that.
I then read on the www that you can specify this via a config file. That is also fine but I don't want to restart icewm, and even reloading it is not so much on my mind when I only really want to specify one image that I have locally.
I then found this blog entry:
http://hrclinux.blogspot.com/2013/05/icewm-changing-wallpaper.html
And I tried the first method via "feh" and it instantly worked. \o/
At that point I gave up investigating. :)
I think on fluxbox I was able to do the same... setbg or some other commandline program.
Would it be possible for icewm to add such a file into bin/?
Something like:
icewm-wallpaper PATH
Super-simple, not making this any more complicated. It would essentially just do what "feh" would do (probably does some x11-specific stuff). If you want to be fancy you could add support for tiling and such, but I am really only interested in the simplest possible use case, so I don't even suggest any feature other than simply being able to set a wallpaper.
Perhaps the current binaries offer that but the manpages were way too intimidating for me. StackOverflow spoiled me, my brain is only able to intake short snippets of information these days - sorry. :)
(I did have a lot of ruby scripts for use on fluxbox but since fluxbox sort of died, I did not really adjust them to any other WM... and I am still only slowly learning icewm. Age is really a handicap, even more so when one is naturally lazy like I am.)
Which part of icewmbg manpage was not understandble? We can hardly help you when the only feedback is "I gave up".
Also, I fail to see that adding some "simple" tool called "icewm-wallpaper" would really help. It sounds intuitive to YOU because it would just "do what I need" but somebody else would hardly understand the exact effects of calling that program by just looking at the name.
Let's break it down to some key requirements. You wish that
a) a command is called b) that command modifies icewm configuration files (persistently) c) that command applies those changes to the active instance immediately?
Is that all, or is it too much?
@gijsbers Although I am skeptical here, the user has a point. At the moment, icewmbg cannot decide what it wants to be, frontend or backend application. It's actually backend the way it works. But then when somebody needs a way to control the backend (daemon/server), those ways are limited ATM, only a couple of signals. You cannot do something like "icewmbg -r -i filename" while expecting that the background daemon will take the information from your -i parameter, it simply does not work that way. You could use -p instead but then again, you don't want to become responsible for the new icewmbg instance, you only want to instrument the existing process!
The idea I had regarding a possible resolution is following: when USER specifies -r and adds some of the parameters like -i, -k, -s, etc. those will be written as option assignments into a tempfile, something like ~/.icewm/prefoverride.temp . And when SIGHUP is received, active icewmbg would look for that tempfile on restarting, include those changes, and then remove the tempfile. Also, the icewmbg command could get an option like --persist which would write those changes not into prefoverride.temp but into prefoverride file (same way as the option storing within icewm already does). Does this sound ok so far?
pkill -x icewmbg
icewmbg -i image.jpg
It can be done in just one command:
icewmbg -p -i image.jpg
Reading the man page would be less work than writing this issue and reading all replies. Can we conclude from this episode that if you are lazy you are bound to needlessly create work for others.
@Code7R You can certainly improve icewmbg. It should cache much less, only a few pixmaps X11 server side.
Of course you can do icewmbg -p -i image.jpg
but then the caller becomes responsible for daemonizing the process properly which cough might be error-prone. It might be better to pass the new wishes from $USER to the already existing instance.
Indeed. Agreed.
@rubyFeedback Thank you for your issue report! I too did not like icewmbg. It doesn't really do the right thing and is rather difficult running as a separate program. It is poor on scaling and theme options. I gave up too. That is largely why I wrote the xde-setbg
utility in the xde-ctools package. It sets a per-workspace background according to a theme automagically. It may be more than what you need, but thanks for your report.
I looked for the XDE desktop for which the xde-ctools are (LOL) but finally realized that it is a common name. Talking about usability, are the xde-ctools callable from sth. like control panel or context-menus ? Also in XFCE, there is install-able UI component called "whisker-menu" which improves its usability a lot (though I don't know in which lang this is programmed). Is something like this planned for icewm ?
so i tried this and this happened :
icewmbg -p -i wallpaper1.jpg
12:18:01.736: icewmbg: Failed to load image 'wallpaper1.jpg'.
although the background did change shades ....just not the actual pic
The manpage says that the -i
option replaces the DesktopBackgroundImage
preference. This is a theme settable preference. Hence it is evaluated relative to the theme directory. If you don't want that, you can specify an absolute path, like: $PWD/wallpaper1.jpg
.
This is indeed not so intuitive. A valid feature request could be to expand command-line file arguments relative to the current working directory.
This commit also adds a -f
option to detach it from the terminal and it accepts non-options as images (without the -i
flag). To set a background image on the command-line do icewmbg -f -p image.jpg
. See manpage. The upcoming icewmbg will support more image formats.