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

Feature Proposal: Control over get method #19

Closed
fa7ad opened this issue Oct 22, 2016 · 6 comments
Closed

Feature Proposal: Control over get method #19

fa7ad opened this issue Oct 22, 2016 · 6 comments

Comments

@fa7ad
Copy link
Contributor

fa7ad commented Oct 22, 2016

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
Copy link
Owner

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
Copy link
Contributor Author

fa7ad commented Nov 4, 2016

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
Copy link
Owner

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

@fa7ad
Copy link
Contributor Author

fa7ad commented Nov 4, 2016

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

@sindresorhus
Copy link
Owner

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

@fa7ad
Copy link
Contributor Author

fa7ad commented Nov 4, 2016

@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.

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

No branches or pull requests

2 participants