summaryrefslogtreecommitdiffstats
path: root/Settings.h
Commit message (Collapse)AuthorAgeFilesLines
* Define MeterModeId to unsigned int and use it throughoutExplorer092024-04-201-1/+2
| | | | | | | | | All uses of meter drawing "mode" numbers now have the type `MeterModeId`, including the uses in structures and arrays. `MeterModeId` is defined as `unsigned int`, as (currently) it doesn't save any code size by defining it to any smaller type. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
* Avoid writing configuration to non-regular filesExplorer092024-04-171-0/+1
| | | | | | | | | | | | | | | | | Check whether the configuration file (after symlink resolution) is writable and is a regular file on htop startup, and only then, write the configuration on exit. Also permit reading when the legacy configuration file ("~/.htoprc") is a symlink. Write the new configuration only when both the legacy file and the new location are writable. Thanks to Christian Göttsche (@cgzones) for providing the initial version of the patch. Fixes: #1426 Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
* Print message if config file was resolvedSefa Eyeoglu2024-03-121-0/+1
| | | | Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
* Relocate include of config.h from header to source modeuleBenny Baumann2023-12-261-2/+0
|
* Force to keep explicit forward declarationsBenny Baumann2023-12-261-2/+2
|
* Update includes based on IWYUBenny Baumann2023-12-261-0/+2
|
* Support dynamic screens with 'top-most' entities beyond processesSohaib Mohamed2023-08-301-4/+13
| | | | | | | | | | | | | | | | | | | | | | 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-9/+9
| | | | | | | | | 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.
* Refactor and consolidate dynamic meters/columns pointersNathan Scott2023-04-061-2/+3
| | | | | | | | This removes the duplication of dynamic meter/column hashtable pointers that has come in between the Settings and ProcessList structures - only one copy of these is needed. With the future planned dynamic screens feature adding another pointer, let us first clean this up before any further duplication happens.
* Add option to shadow path prefixesChristian Göttsche2023-02-031-0/+1
| | | | | | | | | Shadow path prefixes which are used by distributions, like /usr/bin/ /usr/sbin/ /bin/ /sbin/ /usr/libexec/
* TUI-setup for 'hide running in container' optionvaldaarhun2022-08-291-0/+1
|
* Refactor code for rendering command line cacheBenny Baumann2022-05-311-0/+1
| | | | Fixes #1008
* Set correct default sorting directionChristian Göttsche2021-12-171-1/+1
| | | | | Respect the field option defaultSortDesc for the default screen sort direction, e.g. for CPU%.
* Add ScreenSettings_delete helperChristian Göttsche2021-12-081-0/+2
|
* Introduce screen tabsHisham Muhammad2021-12-071-15/+32
| | | | This is a forward port (by nathans) of Hisham's original code.
* Settings: use size_t for meter count in headerChristian Göttsche2021-10-011-1/+1
| | | | | | Header.c:150:26: error: implicit conversion loses integer precision: 'int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] colSettings->len = len; ~ ^~~
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* Merge branch 'header_fmt' of cgzones/htopDaniel Lange2021-08-231-3/+7
|\
| * Add option to change Header layoutChristian Göttsche2021-08-221-3/+7
| |
* | Introduce versioned config files and config_reader_min_versionDaniel Lange2021-08-131-0/+3
|/
* PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed2021-08-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements support for arbitrary Performance Co-Pilot metrics with per-process instance domains to form new htop columns. The column-to-metric mappings are setup using configuration files which will be documented via man pages as part of a follow-up commit. We provide an initial set of column configurations so as to provide new capabilities to pcp-htop: including configs for containers, open fd counts, scheduler run queue time, tcp/udp bytes/calls sent/recv, delay acct, virtual machine guests, detailed virtual memory, swap. Note there is a change to the configuration file path resolution algorithm introduced for 'dynamic meters'. First, look in any custom PCP_HTOP_DIR location. Then iterate, in priority order, users home directory, then local sysadmins files in /etc/pcp/htop, then readonly configuration files below /usr/share/pcp/htop. This final location becomes the preferred place for our own shipped meter and column files. The Settings file (htoprc) writing code is updated to not using the numeric identifier for dynamic columns. The same strategy used for dynamic meters is used here where we write Dynamic(name) so the name can be setup once more at start. Regular (static) columns writing to htoprc - i.e. numerically indexed - is unchanged.
* Disable mouse option when support is unavailablenia2021-07-151-0/+2
|
* Allow for highlighting of deleted executables to be configuredBenny Baumann2021-05-231-0/+1
| | | | Fixes #383
* Print current settings on crashChristian Göttsche2021-05-161-1/+1
|
* Add read-only optionChristian Göttsche2021-04-141-0/+4
| | | | | Add command line option to disable all system and process changing features.
* Use unsigned types for CPU counts and associated variablesChristian Göttsche2021-03-191-1/+1
|
* Merge pull request #436 from cgzones/freebsdGraham Inggs2021-03-181-1/+1
|\ | | | | | | FreeBSD: add support for CPU frequency and temperature Tested on two physical systems running FreeBSD 12.1
| * FreeBSD: add support for CPU frequency and temperatureChristian Göttsche2021-02-051-1/+1
| |
* | Settings: check if writing configuration file was successfulChristian Göttsche2021-03-121-1/+1
| | | | | | | | | | | | Writing to the file stream might fail due to a immutable file or a filesystem error. Check the error indicator for the stream and for fclose() failures.
* | Settings: mark non-modified pointer parameters constChristian Göttsche2021-03-121-1/+1
| |
* | Option and key ("*") to collapse / expand all branches under PID 1Daniel Lange2021-02-131-0/+1
|/ | | | | | | (and PID 2 if kernel threads are shown) Based on hishamhm/htop#510 by Krishna Chaitanya, B Closes #68
* Add option to hide the Function BarChristian Göttsche2021-01-041-0/+1
| | | | | | | | | | 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
* Separate tree and list sort ordersHisham Muhammad2020-12-191-0/+14
| | | | | | | | | | | | 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-0/+1
|
* IWYU updateChristian Göttsche2020-12-061-0/+1
|
* Dynamically load libsensors at runtimeChristian Göttsche2020-12-021-1/+1
|
* Calculate library size (M_LRS column) from maps fileFynn Wulf2020-11-261-1/+1
|
* Improving Command display/sortNarendran Gopalakrishnan2020-11-241-0/+3
|
* Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+4
| | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processesDaniel Lange2020-11-161-0/+2
|\
| * Highlight new and old processes (#74)Adam Saponara2020-10-301-0/+2
| |
* | Drop hideThreads SettingChristian Göttsche2020-11-151-1/+0
|/ | | | | It is only used to read process directories on RedHat beginning with a dot. Unconditionally accept directories with a starting dot.
* Merge branch 'number-cpus-from-zero' of zevweiss/htopDaniel Lange2020-10-201-2/+2
|\ | | | | | | | | * This changes the default to count CPUs from zero (instead of starting at one) * Settings logic is inverted, backwards compatibility is preserved
| * Number CPUs from zero by default.Zev Weiss2020-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Numbering from one is idiosyncratic and inconsistent with basically everything else in the world; it doesn't make much sense as default behavior. All naming is updated to reflect that numbering from one is a non-default, opt-in option. The old label of the flag saved in htoprc ("cpu_count_from_zero") is still supported for backwards compatibility with existing configs, however.
* | Make all required includes explicitBenny Baumann2020-10-181-1/+4
| | | | | | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* | Settings: do not save initial cpu countChristian Göttsche2020-10-121-2/+1
| | | | | | | | Not needed and confusing with ProcessList.cpuCount
* | Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
| |
* | Sort headers/includesBenny Baumann2020-09-291-1/+2
|/
* Revert the vim_mode setting for now, needs a rethinkNathan Scott2020-09-151-2/+0
| | | | | | | | | | | | | There have been too many bugs reported in vim_mode, and the proposed fixes are increasingly fragile - hence we have decided to back it out for now. For reference: https://github.com/htop-dev/htop/issues/69 https://github.com/htop-dev/htop/pull/37 https://github.com/htop-dev/htop/pull/106 The whitespace changes also arrived in commit 12805f61d not sure what that was about, but backed out as well.
* Further, minor cleanups to headers post-MakeHeadersNathan Scott2020-09-081-3/+0
| | | | | Remove leftover empty ifdef/endif pairs, whitespace. The generated htop.h file was also unused - removed.

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