-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable sorting when in tree view #399
Comments
You can sort by PID in tree mode by pressing F6 for least distraction (which was also the previous behaviour implicitly). Also you may press Shift+Z to pause the gathering of process updates. Finally there's Shift+F to follow one particular process around. Does any of these options help with your usecase? |
Thanks for the ongoing maintenance and new features!
This makes things worse. There seems to be more reordering than before. However it woks fine if I disable the tree view. Maybe there is a bug.
Although it helps, it's hard to select a particular process when it's constantly disappearing under the cursor.
Currently that's my workaround. But this is quite cumbersome if you quickly switch in and out of the tree view. I guess a shortcut for 'sort by PID' is also a viable solution if you don't want to go back to the old behavior. |
The release version had a bug with the pause mode that is fixed on master. There the pause mode should work too, cf. #378.
The actual solution we want to implement for this issue hasn't been decided yet. |
Oh, I'm glad not the only one who noticed this! I was afraid I was being too picky. There are two behavior changes which I noticed that, combined, seem to have made it more difficult to pick processes in tree mode. First, is the sorting behavior in tree mode. One habit that I just noticed that I had, because it stopped working in htop 3, was to click "CPU%" or "MEM%" on the title bar to exit tree mode and quickly see the top-consuming process at the top of the list. Now it's a two-step operation (exiting tree mode, switching sort order). Second, is that it seems that the auto-temporary-pause in the sorting order when there is cursor movement seems to be missing. That temporary pause was deliberately added in order to help the user to aim at the correct process when performing a task. For example, if you select a process then press F7/F8 to renice it or F9 to kill it, s to strace it, etc., but then the sorting changes under your feet a millisecond before you type, you end up applying the action to the wrong process. (Upon further testing, it seems that the auto-pause is still present in non-tree view, but it's missing from sorted tree view, which jumps around under your feet). As an end user, my 2 cents with regard to behavior would be to (1) add the auto-temporary-pause to sorted tree view, so that it matches regular view (I think this one is pretty important to avoid accidents), and (2) add Display Options toggles like |
@hishamhm Greetings from the running team meeting, folks say I should remind you: patches accepted :-) |
@BenBE My suggestion would be to have htop quietly remember the sorting mode for list and tree views separately. Switching to tree view, would set the sort mode to the last used sorting mode in tree view. Switching to list view would set the sort mode to the last used mode in list view. A shortcut for PID sorting would also be nice (as well as showing the keybinds for sorting in the F1 help screen and not just the man page). |
I kinda like that idea. Will see how complicated this is to get into the source. As always: PRs appreciated. ;-)
Pressing F6 is documented for sorting. Fixed some other documentation issues related to it though in 0401df8. |
Implements the suggestion from #399 (comment) Thanks to the refactors from 0bd5c8f and 6393baa, this was really easy and clean to do. It maintains the "Tree view always by PID" option in the Settings, which results in some specific behaviors such as "clicking on the column header to exit tree view" and "picking a new sort order to exit tree view", for the sake of the muscle memory of long time htop users. :)
Sorry, I meant shortcuts like
I can take a hint :) Unfortunately, I have very limited time atm, and the time required to familiarise oneself with each project's codebase, means that I have to pick my PR's carefully. I hope you can understand... |
Implements the suggestion from #399 (comment) Thanks to the refactors from 0bd5c8f and 6393baa, this was really easy and clean to do. It maintains the "Tree view always by PID" option in the Settings, which results in some specific behaviors such as "clicking on the column header to exit tree view" and "picking a new sort order to exit tree view", for the sake of the muscle memory of long time htop users. :)
Implements the suggestion from #399 (comment) Thanks to the refactors from 0bd5c8f and 6393baa, this was really easy and clean to do. It maintains the "Tree view always by PID" option in the Settings, which results in some specific behaviors such as "clicking on the column header to exit tree view" and "picking a new sort order to exit tree view", for the sake of the muscle memory of long time htop users. :)
Just checked, it's there on master (left column, third from bottom).
Sure. I've been working on OSS for long enough, to know the various difficulties that come with it. :) Would be glad if you could test #411, which should make the tree view experience much more enjoyable. ;-) |
Implements the suggestion from #399 (comment) Thanks to the refactors from 0bd5c8f and 6393baa, this was really easy and clean to do. It maintains the "Tree view always by PID" option in the Settings, which results in some specific behaviors such as "clicking on the column header to exit tree view" and "picking a new sort order to exit tree view", for the sake of the muscle memory of long time htop users. :)
It would be nice if there was an option to disable sorting in tree view (reverting to previous functionality).
I routinely use the
t
key to toggle to tree view to find a specific process or it's children, and it's difficult tofollow now, with process groups constantly jumping around. Ideally, sorting should only be done in "Sorted"
mode, but I suppose you could implement it as a user-configurable option if someone really likes the idea of
sorting in tree view.
The text was updated successfully, but these errors were encountered: