bpytop icon indicating copy to clipboard operation
bpytop copied to clipboard

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

Open saksmt opened this issue 4 years ago • 1 comments

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:):

  • config option to preprocess Arguments column (for example regex with single group)
  • custom columns + ability to hide predefined

saksmt avatar Nov 11 '20 17:11 saksmt

@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.

aristocratos avatar Nov 14 '20 16:11 aristocratos