aristocratos / bpytop

Linux/OSX/FreeBSD resource monitor
Apache License 2.0
9.99k stars 398 forks source link

[REQUEST] Feature for nix users - strip prefix by regex from arguments #195

Open saksmt opened 3 years ago

saksmt commented 3 years ago

In nix/nixos most programs are located in /nix/store/${SOMELONGHASH}-$PROGNAME-$PROGVERSION/$ACTUAL_PATH and have symlink in /run/current-system/sw/bin. So when program is not forked and started by name from shell it always has starting path /run/... and it gets worse if it was forked (then path is /nix/store/...) which leads to bpytop looking like following:

bpytop-mess

Although it could be ignored since we have Program column but it is not so true for java based applications (IDEA, sbt, freemind, etc.) and suddenly firefox

Possible solutions (not mutually exclusive though :smile:):

aristocratos commented 3 years ago

@saksmt

config option to preprocess Arguments column (for example regex with single group)

This request and your previous request #194 shouldn't be a problem to implement. But I'm gonna have to rewrite the options menu a bit and divide everything up in categories to switch between since it's starting to get a bit crowded in there. Will take a look at it when I have some time.

Customizable columns is a bigger challenge though and something I've been thinking about, I would suggest you put that in a separate request since it will require a lot more coding and testing to get right. That would likely entail adding availability for all (or most) process information psutil has to offer, see https://psutil.readthedocs.io/en/latest/#psutil.Process.as_dict , as well as sizing options and scaling options.