Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Thoughts on a minimalist approach to saying something about the user's interface. #30

Open
allisio opened this issue Apr 23, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@allisio
Copy link

allisio commented Apr 23, 2020

I know we don't wanna become neofetch (in terms of SLOC nor the headache of special-casing so many things), but the fact that we don't say anything about the user's environment is conspicuous.

I think a sensible approach to providing some sort of umbrella "interface" datum would be to report the name of the command attached to the Xorg process's immediate sibling. This would be things like spectrwm, xfce4-session, etc.

Not exactly "pretty", but it'd get us ~80% of the way there for free.

@ss7m
Copy link
Owner

ss7m commented Apr 23, 2020

I remember you mentioned you had wrote a function about getting the name of the window manager- is that what you're referring to?

@allisio
Copy link
Author

allisio commented Apr 23, 2020

Well, this would "work" for desktop environments as well as window managers, and without all the unpleasant X querying. We'd just pidof xinit, get its children, ignore the first one (which would always be Xorg), and use the /proc/PID/comm of the second as a reasonable guess at what the user is running.

@ss7m
Copy link
Owner

ss7m commented Apr 23, 2020

That seems like a reasonable addition. If you make the pull request I'll look it over later.

@GOKOP
Copy link
Contributor

GOKOP commented Apr 23, 2020

Well, this would "work" for desktop environments as well as window managers, and without all the unpleasant X querying. We'd just pidof xinit, get its children, ignore the first one (which would always be Xorg), and use the /proc/PID/comm of the second as a reasonable guess at what the user is running.

GUI login managers don't use xinit

@ss7m ss7m added the enhancement New feature or request label Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants