Coder Social home page Coder Social logo

Set as wallpaper about lximage-qt HOT 16 OPEN

lxqt avatar lxqt commented on July 18, 2024
Set as wallpaper

from lximage-qt.

Comments (16)

jleclanche avatar jleclanche commented on July 18, 2024

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

from lximage-qt.

Vladimir-csp avatar Vladimir-csp commented on July 18, 2024

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

from lximage-qt.

tsujan avatar tsujan commented on July 18, 2024

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.

from lximage-qt.

pmattern avatar pmattern commented on July 18, 2024

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.

from lximage-qt.

paulolieuthier avatar paulolieuthier commented on July 18, 2024

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.

from lximage-qt.

Vladimir-csp avatar Vladimir-csp commented on July 18, 2024

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.

from lximage-qt.

jleclanche avatar jleclanche commented on July 18, 2024

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.

from lximage-qt.

paulolieuthier avatar paulolieuthier commented on July 18, 2024

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.

from lximage-qt.

tsujan avatar tsujan commented on July 18, 2024

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

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

from lximage-qt.

paulolieuthier avatar paulolieuthier commented on July 18, 2024

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.

from lximage-qt.

tsujan avatar tsujan commented on July 18, 2024

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 ;)

from lximage-qt.

Vladimir-csp avatar Vladimir-csp commented on July 18, 2024

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.

from lximage-qt.

tsujan avatar tsujan commented on July 18, 2024

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.

from lximage-qt.

Vladimir-csp avatar Vladimir-csp commented on July 18, 2024

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.

from lximage-qt.

PCMan avatar PCMan commented on July 18, 2024

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.

from lximage-qt.

Vladimir-csp avatar Vladimir-csp commented on July 18, 2024

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

from lximage-qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.