Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set as wallpaper #8

Closed
intialonso opened this issue Sep 4, 2014 · 17 comments
Closed

Set as wallpaper #8

intialonso opened this issue Sep 4, 2014 · 17 comments

Comments

@intialonso
Copy link

It will be nice to have an option to set the current image as wallpaper.

@jleclanche
Copy link
Member

@PCMan Assigning you since this is pcmanfm functionality. Or libfm maybe? Is there a spec somewhere on wallpapers?

@Vladimir-csp
Copy link

Maybe, an editable list of commands and process conditions? With some defaults.
Which command is triggered depens on current running processes. E.g.: if spacefm process is running in current session, execute spacefm --set-wallpaper $FILE, etc

@tsujan
Copy link
Member

tsujan commented Jan 8, 2016

I'm against such an option because lximage-qt can be used outside LXQT and who knows how the wallpaper could be set for other desktops (consider Enlightenment as an example)?

That said, if the option in question can be added in such a way that it's enabled only when the desktop is drawn by pcmanfm-qt, it'll be worth considering, IMO.

@pmattern
Copy link
Contributor

pmattern commented Jan 9, 2016

It definitely would have to be considered that LXImage-Qt can be run without LXQt.
But isn't it rather easy to check whether or not it's running in an LXQt session? Couldn't this e. g. be done by evaluating $XDG_CURRENT_DESKTOP or looking for a PCManFM-Qt instance that's running with switch --desktop set?

Being able to set wallpapers from an application that at the same time allows for browsing available graphics seems to be a feature that many users want. It doesn't get and hardly can ever get provided by GUI "Desktop Preferences" (invocation pcmanfm-qt --desktop-pref=[...]), though.
So it would really be quite an advantage to complement LXImage-Qt with the ability to set wallpapers, IMO.

@paulolieuthier
Copy link
Contributor

Unfortunately, there is no XDG spec for handling wallpapers. Ideally, there should be one. I think the best way to go is to start the push for creating a new one. The first step on that would be creating a working prototype.

One way it could work is making pcmanfm-qt register itself as a wallpaper handler. lximage-qt would look for a handler, find pcmanfm-qt and ask it to set the wallpaper. Of course, that would be though DBus, just like the status notifier works. Another way would be through a simple configuration file.

I'm sure that must have been discussed before in the linux comunnity.

@Vladimir-csp
Copy link

Would-be spec should be simpler. Setting a desktop(s) image(s) can do away without DBus or other overengineered stuff. Something like $XDG_CONFIG_HOME/wallpapers/[files in alphanumeric order] or ini-style config file.

@jleclanche
Copy link
Member

I have lost hope in xdg. The mailing list is completely unresponsive any time something is proposed. I believe a wallpaper spec was proposed at some point, but essentially nobody cared.

It's annoying.

@paulolieuthier
Copy link
Contributor

It must be something robust enough to be accepted by other DEs and become a standard. I like @Vladimir-csp's idea, but I think we should foresee the possible future generalizations, like handling the login screen's wallpaper, global wallpaper (for all users), multiple-images wallpaper and probably more. We could start implementing it in pcmanfm-qt and when we feel it's ready, we promote it for adoption.

@tsujan
Copy link
Member

tsujan commented Jan 11, 2016

looking for a PCManFM-Qt instance that's running with switch --desktop set

That could be practical. I'll experiment with it.

@paulolieuthier
Copy link
Contributor

That could be practical.

Maybe pratical, but inelegant and too specific.

Thinking about @Vladimir-csp's idea again, I now dislike it. Issues:

  • lximage-qt (or any other app) wouldn't know if there is a wallpaper handler active.
  • lximage-qt would need to mess with the config file by itself, even though it's the handler's responsability.

The most correct and elegant way to go IMO is to use DBus. It looks overcomplicated for such a small task, but it'd fix all issues. Only the handler changes the configuration, and lximage-qt would know the presence of it.

@tsujan
Copy link
Member

tsujan commented Jan 11, 2016

Maybe practical, but inelegant and too specific.

IMO, it should be specific (to pcmanfm-qt) for the reason I mentioned above. As for elegance, it could have a clear meaning when it's about appearances, which, of course, are important to me. I could argue that adding dbus dependency for such a job is "inelegant" or "disproportionate" -- but I don't ;)

@Vladimir-csp
Copy link

Thinking about @Vladimir-csp's idea again, I now dislike it. Issues:

lximage-qt (or any other app) wouldn't know if there is a wallpaper handler active.
lximage-qt would need to mess with the config file by itself, even though it's the handler's responsability.

If there is a spec on the config file, no app should care or know about whether there is a wallpaper handler active, it should just update the file according to the spec. Handler should care about the rest when it sees config file being modified.

@tsujan
Copy link
Member

tsujan commented Jan 13, 2016

If there is a spec on the config file, no app should care ...

If I've got your point correctly, that would need changes outside lximage-qt. Wouldn't it be better to first focus on lximage-qt itself? I'll do some experiments when I have time.

@Vladimir-csp
Copy link

As an experiment, PCManFM could divert wallpaper configuration to a neutral config file and that could be made a working proposition for the spec. Even if XDG would be slow to react, others may follow.

@PCMan
Copy link
Member

PCMan commented Jan 15, 2016

Proposing an XDG spec for this is really a good idea. The only problem is, we might be the only one who use it. At least Gnome won't use it since they put every configuration in their dconf.
However, I'd say let's do it. At least get this well-documented so other apps which want to support the functionality can do it easily.

@Vladimir-csp
Copy link

Great!
So, the basics, what parameters should be stored. If it is ini config file, it would be something like this:

[desktop_0]
filename=
scale_method= ;none|tile|stretch|fit|crop
color_1= ;background color
color_2= ;second background color for optional gradient
gradient_type= ;none|horizontal|vertical

@stefonarch
Copy link
Member

Can be done like that, with custom actions:

immagine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants