Macchina-CLI / libmacchina

A library providing access to all sorts of system information.
https://crates.io/crates/libmacchina
MIT License
68 stars 20 forks source link

Fix displayed name for GNOME Terminal and Black Box #174

Open bfabio opened 5 months ago

bfabio commented 5 months ago

libmacchina uses /proc//comm, which is limited to 15 chars and it's not guaranteed to hold a user friendly name.

For example GNOME Terminal is actually /usr/libexec/gnome-terminal-server and its comm is gnome-terminal-.

Add a replacement function that returns user friendly names and that can be expanded with more.

grtcdr commented 5 months ago

While the current method for looking up the terminal emulator is a complete hack - it's probably best to ask the display server or compositor what the current window is, but to my knowledge Wayland still does not offer this - this is a good initiative.