-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implement XDG Autostart OnlyShowIn and NotShowIn keys. #34
Comments
This makes a lot of sense. I hope I find the time to look at this soon. Meanwhile, PRs are of course welcome |
Hm thinking about this: What DE is the script supposed to assume? The script itself works regardless of DE/WM, so I suppose this setting must be provided externally. So we'd probably require this as either an ENV var or a direct function parameter, ie. Thoughts? Maybe I'm on the wrong track. Is there some commonly used environment variable that we could read? |
Yeah, I was reading through the XDG spec and getting frustrated about this specific point. They have a list of approved keys to check against, but seem to leave it up the individual DE on how to actually do this. XDG_CURRENT_DESKTOP seems like the right env var to check. Gnome sets this to "GNOME", and I believe the other main DE's do the same thing, although I can't find this documented as part of the XDG specs, and I haven't checked myself whether every DE listed in OnlyShowIn sets the variable in the same way. FWIW, In my sway config, I set XDG_CURRENT_DESKTOP="sway". |
Alright thanks for the research. I guess this is what it'll work against then |
According to the XDG Desktop Autostart spec, a desktop file should only be autostarted in desktop environments matching the "OnlyShowIn" values.
Similarly for NotShowIn, the application should only be started in desktop environments not matching the given values.
This would be great as I woudn't manually have to set XDG_CONFIG_DIRS=$XDG_CONFIG_HOME before calling autostart, and can rely on this command to not start e.g the gnome welcome screen in my sway session while still starting applicable applications in /etc/xdg/autostart.
The text was updated successfully, but these errors were encountered: