Closed crodjer closed 2 years ago
@cjbassi I was wondering if you could take a quick glance at the idea? And if it makes sense, the implementation. I have been using this in my local ytop
and finding it useful.
Yeah I've looked over it a bit but I'm going to need a bit more time. I'll get to it the next chance I get. Thanks for the pr btw.
Point number one looks good. I'm still debating on point number two, originally I was thinking of adding a key bind to disable and enable following the process. Also I'm not really a fan of point number three, if we do set up a key bind I think it should be a unique key.
Also, cc #53
Point number one looks good.
Great.
I'm still debating on point number two, originally I was thinking of adding a key bind to disable and enable following the process.
Sure, I'll wait for what you think makes sense as the utilities behaviour, based on the philosophy. I have also made not following current process as the default, which you may want to make into a flag.
Also I'm not really a fan of point number three, if we do set up a key bind I think it should be a unique key.
I agree there. I went the path of least resistance for the POC. Any binding could work here, as long as it is a possibility.
Also, cc #53
@cjbassi Made some more changes:
Support for toggling follow proc
f
key to toggle following of processes.gg
Nice, I'm liking the changes. Couple things:
Nice, I'm liking the changes. Couple things:
1. We should add follow proc help to the README
Sure, will do.
2. We need to increment the height of the help widget because part of it is cut off now
Ahh, okay. Will fix.
3. I decided that I actually really like the way htop handles process selection, and I think we should replicate that. So whenever the cursor is moved, we stop sorting the processes for ten seconds and we stop following the current process. If you would be up for that :) Thanks for the work already by the way.
I can take this up. I wasn't aware of this in htop
. This totally makes sense and will make it more intuitive while managing processes, specially in bulk. I'll try to send a PR over the weekend.
I switched my full time job this month and have been busy, so couldn't focus on this yet. I'll try to make the changes we discussed as soon as I find some time.
This introduces an ability to not-follow a process in the
proc
widget. I having to dogg
whenever I visitytop
to find out the process which is currently using high mem/CPU. It'd be great to have the ability to not always track the currently highlighted process.This patch is a POC for that. What it does is:
follow_proc
, which is false by default. If it is set totrue
, therender
will always jump to the position for the highlighted position. If it isfalse
, it'll keep the selected position the same, no matter which process lands on it.gg
),ytop
will keep track of the process.gg
or scroll to top on the other hand, stops the process tracking facilitating a view such as: the current process taking the most resources.Esc
to setfollow_proc
as false and disable following of a process.I understand this cannot be merged as is, but I'd like to start a discussion. If this makes sense, I'd like suggestions on what can be changed in the patch to merge it in.