paleofetch icon indicating copy to clipboard operation
paleofetch copied to clipboard

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

Open allisio opened this issue 4 years ago • 4 comments

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.

allisio avatar Apr 23 '20 18:04 allisio

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

ss7m avatar Apr 23 '20 18:04 ss7m

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.

allisio avatar Apr 23 '20 18:04 allisio

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

ss7m avatar Apr 23 '20 19:04 ss7m

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

GOKOP avatar Apr 23 '20 20:04 GOKOP