summaryrefslogtreecommitdiffstats
path: root/MainPanel.c
Commit message (Collapse)AuthorAgeFilesLines
* Clicking on column headers needs to also update the sort direction arrowDaniel Lange2024-01-171-1/+1
|
* Update includes based on IWYUBenny Baumann2023-12-261-0/+3
|
* Add includes for config.h as per the discussion in PR #1337Daniel Lange2023-12-261-0/+2
| | | | | | Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
* Support dynamic screens with 'top-most' entities beyond processesSohaib Mohamed2023-08-301-5/+15
| | | | | | | | | | | | | | | | | | | | | | This implements our concept of 'dynamic screens' in htop, with a first use-case of pcp-htop displaying things like top-filesystem and top-cgroups under new screen tabs. However the idea is more general than use in pcp-htop and we've paved the way here for us to collectively build mroe general tabular screens in core htop, as well. From the pcp-htop side of things, dynamic screens are configured using text-based configuration files that define the mapping for PCP metrics to columns (and metric instances to rows). Metrics are defined either directly (via metric names) or indirectly via PCP derived metric specifications. Value scaling and the units displayed is automatic based on PCP metric units and data types. This commit represents a collaborative effort of several months, primarily between myself, Nathan and BenBE. Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Signed-off-by: Nathan Scott <nathans@redhat.com>
* Introduce Row and Table classes for screens beyond top-processesNathan Scott2023-08-301-33/+30
| | | | | | | | | This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity.
* Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott2023-05-081-12/+11
| | | | | | | | | | | First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
* Drop references to 'Process' in generic screen codeNathan Scott2023-05-081-3/+3
| | | | | | | | | | | | Prepare the way for making screen tabs more generalised, able to cater to entities other than processes. 'actionTogglePauseProcessUpdate' -> 'actionTogglePauseUpdate' 'pauseProcessUpdate' -> 'pauseUpdate' 'hideProcessSelection' -> 'hideSelection' 'hideProcessSelection' -> 'hideSelection' Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
* Check for action flags correctlyChristian Göttsche2022-10-201-8/+8
| | | | | | | | Actions are not simple flags with a single bit set, but might have multiple bits set for implying actions. Do not handle an action if only an implying bit is set. Fixes: edc3de7cb597 ("Action: specify implication in code not in comments")
* Please Clang 15Christian Göttsche2022-08-091-1/+1
| | | | | | | CRT.c:1015:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] void CRT_done() { ^ void
* Improve MainPanel Label on active inc filter (Filter <-> FILTER)Daniel Lange2022-03-251-3/+4
|
* Introduce screen tabsHisham Muhammad2021-12-071-8/+14
| | | | This is a forward port (by nathans) of Hisham's original code.
* Adds a missing HAVE_GETMOUSE check.fraggerfox2021-09-291-2/+8
| | | | | | Fixes builds failing with error MainPanel.c:65:62: error: 'Settings {aka struct Settings_}' has no member named 'enableMouse' if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* MainPanel: do not reset on disabled mouse eventsChristian Göttsche2021-09-181-2/+2
| | | | Do not reset the hidden process selection (and hidden function bar) on mouse events, when mouse support is disabled.
* Abstract resize handling by adding a new Htop reactionChristian Göttsche2021-08-221-0/+3
|
* Make MainPanel_pidSearch a static functionChristian Göttsche2021-04-211-1/+1
| | | | Not used elsewhere.
* Add read-only optionChristian Göttsche2021-04-141-2/+3
| | | | | Add command line option to disable all system and process changing features.
* Mark several non-modified pointer variables constChristian Göttsche2021-01-111-2/+2
|
* Avoid function cast by refactoring callback prototypeChristian Göttsche2021-01-061-6/+6
|
* IncSet: do not resize on our own and do not search on resizeChristian Göttsche2021-01-041-1/+5
| | | | | The supervising ScreenManager will resize all Panels. Also do not start the search on resize.
* Add option to hide the Function BarChristian Göttsche2021-01-041-1/+7
| | | | | | | | | | Support three settings: - Always show Function Bar - Always hide the Function Bar, except in Infoscreens (Env/Locks...) and when editing the search and filter mode - Hide the Function Bar on ESC until the next user input Closes: #439
* Restore highlighted header of current sorted process columnChristian Göttsche2020-12-231-2/+8
|
* Rework drawing of FunctionBarChristian Göttsche2020-12-201-7/+12
| | | | | | | | | | | Draw the FunctionBar within Panel_draw instead of manually throughout the code. Add an optional PanelClass function drawFunctionBar, to allow specific panels to override the default FunctionBar_draw call. Rework the code on color change, to really change all colors (selection markers and panel headers). Closes: #402
* Separate tree and list sort ordersHisham Muhammad2020-12-191-4/+5
| | | | | | | | | | | | Implements the suggestion from https://github.com/htop-dev/htop/issues/399#issuecomment-747861013 Thanks to the refactors from 0bd5c8fb5da and 6393baa74e5, 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. :)
* Add "Tree view is always sorted by PID" option to mimic htop 2 behaviorHisham Muhammad2020-12-191-1/+4
|
* MainPanel: use actual KEY_RESIZE instead of KEY_SHUFFLEChristian Göttsche2020-12-161-1/+1
| | | | KEY_RESIZE (0632) is equal to KEY_SHUFFLE (0x19a)
* MainPanel: do not reset hideProcessSelection on KEY_SHUFFLEChristian Göttsche2020-12-151-1/+1
| | | | KEY_SHUFFLE might get send from time to time, e.g. in a tmux session.
* Minor code streamliningBenny Baumann2020-12-021-5/+1
|
* Implement sorting in tree modeMaxim Zhiburt2020-12-021-3/+0
|
* Hide process selection on ESCChristian Göttsche2020-11-281-0/+4
| | | | | | Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
* Improving Command display/sortNarendran Gopalakrishnan2020-11-241-1/+1
|
* Mark ProcessList_keyAt argument constChristian Göttsche2020-11-151-1/+1
|
* Embracing branchesBenny Baumann2020-11-021-4/+5
|
* Spacing around operatorsBenny Baumann2020-11-021-2/+4
|
* Make all required includes explicitBenny Baumann2020-10-181-3/+11
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Add key to pause process list updatesChristian Göttsche2020-10-121-0/+2
|
* Compress size of default FunctionBarChristian Göttsche2020-10-121-1/+1
|
* Mark Object instances constChristian Göttsche2020-10-071-1/+1
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Call character checking function with unsigned charChristian Göttsche2020-09-171-1/+1
| | | | See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
* Axe automated header generation.Zev Weiss2020-09-031-19/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* Merge branch 'hishamhm-pull-949'Nathan Scott2020-08-201-1/+1
|\
| * MainPanel: add seventh char to main functionsduchampdev2019-09-121-1/+1
| | | | | | | | reason: currently, for example 'search' and 'filter' look very densely packed
* | Merge branch 'hishamhm-pull-960'Nathan Scott2020-08-201-3/+3
|\ \
| * | Clean up existing whitespaceDaniel Flanagan2019-10-311-3/+3
| |/
* / Resolve compiler warnings and errors relating to the Arg unionNathan Scott2020-08-201-5/+1
|/ | | | | | | | | | | | Promote the Arg union to a core data type in Object.c such that it is visible everywhere (many source files need it), and correct declarations of several functions that use it. The Process_sendSignal function is also corrected to have the expected return type (bool, not void) - an error being masked by ignoring this not-quite-harmless warning. I've also added error checking to the kill(2) call here, which was previously overlooked / missing (?).
* Replace size_t with int/void* unionHisham Muhammad2018-02-181-2/+7
| | | | | | | | I was occasionally passing negative values to size_t. Plus, this better reflects the intent of the variant argument. Reported by Coverity: https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500
* Mark some things as constRichard2017-07-221-1/+1
| | | | | | | Several string pointer arrays pointed to const strings but were not const themselves. A few various structures and arrays were also marked const.
* 'Follow' only if element is found in searchHisham2016-07-281-4/+4
|
* Added Ctrl+A and Ctrl+E to go to beginning and end of line.Hisham2016-06-151-14/+0
| | | | | (Also, '^' and '$') Closes #508.

© 2014-2024 Faster IT GmbH | imprint | privacy policy