summaryrefslogtreecommitdiffstats
path: root/Action.c
AgeCommit message (Collapse)Author
2021-02-16Shorten keyboard help to fit default screen widthDaniel Lange
2021-02-13Option and key ("*") to collapse / expand all branches under PID 1Daniel Lange
(and PID 2 if kernel threads are shown) Based on hishamhm/htop#510 by Krishna Chaitanya, B Closes #68
2021-02-07Remove force sort order to ASC when returning to tree modeDaniel Lange
Bug found by BenBE via IRC
2021-02-05Use MainPanel type in State structChristian Göttsche
The State struct holds a pointer to the main process panel. Use the distinct MainPanel type, to improve maintainability regrading its usage. This avoids usages of down-casts from Panel to MainPanel, only up-casts from MainPanel to Panel are now required.
2021-01-27Drop invalid todoChristian Göttsche
The surrounding code has nothing to do with colors
2021-01-11Linux: Add SwapCached to the swap meterDavid Zarzycki
According to the Linux kernel documentation, "SwapCached" tracks "memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)."
2021-01-11Mark several non-modified pointer variables constChristian Göttsche
2021-01-06Hashtable: use more distinct typename for key typeChristian Göttsche
2021-01-04Panel_new: reorder argumentsChristian Göttsche
Reorder owner and type so they match the order of Panel_init
2021-01-04Add option to hide the Function BarChristian Göttsche
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
2021-01-04Action: drop resize callbackChristian Göttsche
The supervising ScreenManager will resize all Panels
2021-01-01Action: remove trivial wrapper functionChristian Göttsche
2020-12-23Added keybind 'N' for sorting by PIDJake Mannens
2020-12-23Position help labels one step to the rightJake Mannens
2020-12-24Remove 'n' and 'N' search inc/dec keybindsJake Mannens
2020-12-22Merge branch 'resize_bar' of https://github.com/cgzones/htop into ↵Nathan Scott
cgzones-resize_bar
2020-12-21De-lazy @cgzones :)Daniel Lange
2020-12-21Action: sort key binding assignmentsChristian Göttsche
Avoid accidental duplicate usage.
2020-12-20Rework drawing of FunctionBarChristian Göttsche
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
2020-12-19Separate tree and list sort ordersHisham Muhammad
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. :)
2020-12-19Add "Tree view is always sorted by PID" option to mimic htop 2 behaviorHisham Muhammad
2020-12-18Update key mapping documentation for sortingBenny Baumann
2020-12-09Sort in paused mode after inverting sort orderChristian Göttsche
2020-12-02Implement sorting in tree modeMaxim Zhiburt
2020-11-28Hide process selection on ESCChristian Göttsche
Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
2020-11-26Drop unneeded parameters to the ScreenManager constructorNathan Scott
All calls to ScreenManager_new always pass the same first five values, the orientation is always HORIZONTAL and the y1 parameter is always the height of the passed-in header struct pointer. I think its safe to assert at this point that no VERTICAL orientation will arrive (if it does, its no harm in re-adding this then) - so we can remove unused conditionals (and TODOs) based on orientation too.
2020-11-24Improving Command display/sortNarendran Gopalakrishnan
2020-11-19IWYU update (FreeBSD)Christian Goettsche
2020-11-19IWYU update (Linux)Christian Göttsche
2020-11-17Hashtable updateChristian Göttsche
- use consistent type for key by introducing a new typedef - use unsigned types for sizes - name parameters in foreach function typedef
2020-11-15Drop hideThreads SettingChristian Göttsche
It is only used to read process directories on RedHat beginning with a dot. Unconditionally accept directories with a starting dot.
2020-11-15Resolve merge conflicts, merge #298 "Macro cleanup" from @BenBEDaniel Lange
2020-11-14Split platform dependent parts for file locks screenBenny Baumann
2020-11-09Implement screen for active file locksFynn Wulf
2020-11-02Wrap inline structure definitionsBenny Baumann
2020-11-02Embracing branchesBenny Baumann
2020-11-02Spacing around operatorsBenny Baumann
2020-11-02Convert addattrstr to static inline functionBenny Baumann
NB: The macro could have been a braced while(0) loop, which without optimization produces more code
2020-10-27Avoid some unnecessary casts and mark some not changing variables constChristian Göttsche
2020-10-20IWYU updateChristian Göttsche
- Add Settings forward declaration in Process.h - Add assert.h include in XUitls.c - Add conditional stdbool.h include in Object.h - Drop unneeded stddef.h include in Richstring.c - Drop unneeded unistd.h include in Process.h - Drop unneeded string.h include in linux/Platform.c - Use String_eq to avoid string.h include in Action.c - Improve script to run custom iwyu version
2020-10-20Merge branch 'help_lines' of https://github.com/cgzones/htopDaniel Lange
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-16Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann
2020-10-16Misc conversion fixesChristian Göttsche
2020-10-14Do not hard-code line numbers in help screen building codeChristian Göttsche
2020-10-12Add key to pause process list updatesChristian Göttsche
2020-10-09use 'w' for command wrapping as 'M' is already usedryenus
since 'M' is already used for sort-by-memory, as with: keys['M'] = actionSortByMemory; reorder help info about shortcut keys
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-29Drop redundant casts to the same typeChristian Göttsche
2020-09-24Do not drop qualifier in castChristian Göttsche
ListItem.c:73:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj1 = (ListItem*) cast1; ^ ListItem.c:74:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj2 = (ListItem*) cast2; ^ Process.c:434:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p1 = (Process*)v1; ^ Process.c:435:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p2 = (Process*)v2; ^ Process.c:441:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ Process.c:443:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v1; ^ Process.c:444:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v2; ^ Process.c:446:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v1; ^ Process.c:447:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v2; ^ AffinityPanel.c:37:16: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->text); ^ AffinityPanel.c:39:19: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->indent); ^ linux/LinuxProcess.c:294:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ linux/LinuxProcess.c:296:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:297:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v2; ^ linux/LinuxProcess.c:299:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:300:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v2; ^ linux/LinuxProcessList.c:62:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* a = (TtyDriver*) va; ^ linux/LinuxProcessList.c:63:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* b = (TtyDriver*) vb; ^ linux/Battery.c:130:21: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] free((char *) isOnline); ^ linux/Battery.c:197:26: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName); ^ linux/Battery.c:209:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName); ^ linux/Battery.c:262:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName); ^