sindresorhus / wallpaper

Manage the desktop wallpaper
MIT License
1.05k stars 91 forks source link

Feature Proposal: Control over get method #19

Closed fa7ad closed 1 year ago

fa7ad commented 8 years ago

What do you think about optional "environment" names? One way to make sure the correct flags are used when the command is same but he environment is different.

Example:

wallpaper.get().then(console.log) // behaves normally (current behaviour)

wallpaper.get('cinnamon').then(console.log) // tries only the command for cinnamon and nothing else

This could be also be useful for people that use multiple Desktop Environments / Tools. Plus, it would be an "easy" way to fix #18 AND avoid future problems like this

sindresorhus commented 8 years ago

Sounds like a leaky abstraction. I don't think this is how we should fix it.

it would be an "easy" way to fix

I prefer proper fixes, not easy ones.

fa7ad commented 8 years ago

yeah, figured as much. @Sohail05's suggestions seem better. Although, I think this could be useful even if its not relevant to that issue (i.e. Multiple environments)

I use feh, nitrogen AND gnome3. So wallpaper has 1/3 chance of choosing the right program by default.

sindresorhus commented 8 years ago

Sorry, I'm not a Linux user. Why would you use multiple environments?

fa7ad commented 8 years ago

@sindresorhus many reasons, including but not limited to lower resource usage for some work, multiple users et al.

sindresorhus commented 8 years ago

And there's no standard Linux way of getting the active environment?

fa7ad commented 8 years ago

@sindresorhus none that's guaranteed to work, no. Some window managers/desktop environments set, $DESKTOP_SESSION, some don't. GDM sets $GDMSESSION, mdm doesn't.

but $DESKTOP_SESSION is an accepted convention by most WMs and DEs but, the problem stays the same, if you're under i3 for example, you could be using any number of apps to change the desktop background, including feh and nitrogen. Same goes for awesomewm. #18 happened because Cinnamon is a fork of GNOME and share a lot of code including the mechanism for changing the wallpaper, except the key names.

In short, Its the wild west out here.