Commit Graph

1935 Commits

Author SHA1 Message Date
Christian Göttsche d609c04fe4 CRT: add METER_VALUE_ERROR and adjust some METER_VALUE_WARN colors 2020-12-26 13:32:29 +01:00
Daniel Lange ca9d7cd708 Also find libsensors.so.4 for Fedora and friends 2020-12-25 13:05:37 +01:00
Daniel Lange debeac49cd Merge branch 'cpufreq' of hadfl/htop for Solaris / OmniOS support 2020-12-25 12:24:03 +01:00
Daniel Lange a0b899f29d Note Shift-F3 use in man page 2020-12-25 11:53:02 +01:00
Daniel Lange 8b83a9f055 Enable going back to previous search matches (Shift-F3) 2020-12-25 11:53:02 +01:00
Dominik Hassler 495f2292dc add support to display CPU frequencies on Solarish platforms 2020-12-25 09:26:50 +00:00
Daniel Lange 1cc3f8074f Merge branch 'user_wide' of cgzones/htop 2020-12-23 22:55:35 +01:00
Christian Göttsche aa08279964 Linux: accept clock CPU frequency
processor   : 0
cpu         : POWER8 (architected), altivec supported
clock       : 4024.000000MHz
revision    : 2.0 (pvr 004d 0200)

Closes: #424
2020-12-23 19:58:10 +01:00
Christian Göttsche 5359eae28b Process: use correct column aligning on wide username
Closes: #421
2020-12-23 19:56:51 +01:00
Jake Mannens f1463fdd64 Added keybind 'N' for sorting by PID 2020-12-23 18:30:26 +01:00
Jake Mannens 3edb6e1ea3 Position help labels one step to the right 2020-12-23 18:24:22 +01:00
Daniel Lange 71ddc6a6a1 Merge branch 'remove-n-keybind' of jakem72360/htop 2020-12-23 18:22:17 +01:00
Dominik Hassler b9336af76f fix argument type following prototype change in "Invert Process_compare resolution so that superclass matches run first" 2020-12-23 17:35:23 +01:00
Jake Mannens f46ddd3230 Remove 'n' and 'N' search inc/dec keybinds 2020-12-24 03:24:15 +11:00
Christian Göttsche 94d7f0b585 RichString: return number of written characters on write/append functions 2020-12-23 12:47:53 +01:00
Christian Göttsche 86d2931255 Restore highlighted header of current sorted process column 2020-12-23 12:47:04 +01:00
Nathan Scott 0672be7db1 Update version number for git repo builds 2020-12-22 17:41:14 +11:00
Nathan Scott 0b989ee38c Bump version number for 3.0.4 release 2020-12-22 17:39:42 +11:00
Christian Göttsche 3fb0024fd3 Merge branch 'misc' of https://github.com/cgzones/htop into cgzones-misc 2020-12-22 17:30:29 +11:00
Nathan Scott dfb9b82607 Resolve clang-analyzer signed/unsigned comparison CI failure 2020-12-22 16:58:17 +11:00
Nathan Scott fc7aead36b Merge branch 'harden_makecommandstr' of https://github.com/BenBE/htop into BenBE-harden_makecommandstr 2020-12-22 16:55:11 +11:00
Nathan Scott 737cd6167a Merge branch 'resize_bar' of https://github.com/cgzones/htop into cgzones-resize_bar 2020-12-22 15:25:08 +11:00
Benny Baumann 6502b02666 DiD: Ensure string offsets are inside string boundaries 2020-12-21 22:35:38 +01:00
Christian Göttsche cdfd407e2e Panel_init: initialize selectedLen member 2020-12-21 22:34:50 +01:00
Christian Göttsche 64c05a1ed5 EnvScreen: mark local class functions static 2020-12-21 22:34:50 +01:00
Christian Göttsche a7612b0b7d TraceScreen: mark local class functions static 2020-12-21 22:34:50 +01:00
Christian Göttsche 3ec8f67ab2 InfoScreen: drop unused member 2020-12-21 22:34:50 +01:00
Benny Baumann 10c6810bff Avoid NULL dereference on zombie processes
Fixes #361
2020-12-21 22:29:18 +01:00
Benny Baumann 068561351f Document dynamic bindings and assumed external configuration 2020-12-21 22:15:28 +01:00
Daniel Lange 9b8b380c32 De-lazy @cgzones :) 2020-12-21 20:40:00 +01:00
Christian Göttsche a09ad6b8b4 Action: sort key binding assignments
Avoid accidental duplicate usage.
2020-12-21 15:53:42 +01:00
Christian Göttsche 9a86577cf2 DragonFlyBSD update
- move some functions to file scope
- drop unused global variable
2020-12-20 18:32:04 +01:00
Christian Göttsche 8db8b9edac DragonFlyBSD update
- drop unused kinfo includes and link argument
- detect kvm library necessity at configure step
- fix variable typo
2020-12-20 18:22:41 +01:00
Benny Baumann 4a73e80338 Make remaining number literals use uppercase 2020-12-20 17:17:51 +01:00
Benny Baumann 5fa1c7040d Minor typo and comment clarification 2020-12-20 17:15:51 +01:00
Christian Göttsche 3f9c63d5c0 MetersPanel: drop color interruption in FunctionBar 2020-12-20 17:02:20 +01:00
Christian Göttsche 358d20687f Use variable-length-array instead of small dynamic allocation 2020-12-20 17:01:50 +01:00
Christian Göttsche e3862aa67e Rework drawing of FunctionBar
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-20 17:01:50 +01:00
Christian Göttsche 7e7a53c415 Mark event arrays const 2020-12-20 16:58:37 +01:00
Christian Göttsche 6b100b0cf4 Use upper case numeric literals
See https://rules.sonarsource.com/c/RSPEC-818
2020-12-20 16:58:17 +01:00
Christian Göttsche 6e46fd6f1f BarMeter: rework text padding
In case the text is too long for the bar, try to fit by truncating at a
space character.

E.g.
    [|24.1% 2000Mhz 40°C]
    [24.1% 2000Mhz 40°C]
    [||||24.1% 2000Mhz]
    [|||24.1% 2000Mhz]
    [||24.1% 2000Mhz]
    [|24.1% 2000Mhz]
    [24.1% 2000Mhz]
    [||||   24.1%]
    [||||  24.1%]
    [|||| 24.1%]
    [||||24.1%]
    [|||24.1%]
    [||24.1%]
    [|24.1%]
    [24.1%]
    [24.1]
    [24.]
    [24]
    [2]
2020-12-20 16:55:17 +01:00
Christian Göttsche 22da57d621 CPUMeter: drop minimum width of CPU usage in bar mode
The usage percentage is the first text, no need to set a minimum width.
The BarMeter does already add padding.
2020-12-20 16:55:17 +01:00
Christian Göttsche c5e31ba4aa Meter: fix artifacts with very tiny width
- The Bar Meter might override the right border
- The TextMeter might wrap-around into the next line
2020-12-20 16:55:17 +01:00
Christian Göttsche f878f302ca Remove duplicate newline in CRT_fatalError calls 2020-12-19 21:30:39 +01:00
Alexander Momchilov 67ccd6b909 Unhardcode tick-to-ms conversion
Division by 100000.0 worked because `sysconf(_SC_CLK_TCK)` happened to be 100.

By unhardcoding:

1) It becomes more clear what this 100000.0 figure comes from.
2) It protects against bugs in the case `sysconf(_SC_CLK_TCK)` ever changes.
2020-12-19 21:30:39 +01:00
Christian Göttsche f614b8a19f Mark Platform_defaultFields const 2020-12-19 21:13:32 +01:00
Christian Göttsche c150e4bde9 Enable -Wformat=2
Now that the global format variable Process_pidFormat is gone, enable
the compiler warning -Wformat=2.
2020-12-19 21:13:32 +01:00
Christian Göttsche 9f68c8d341 Merge Process_pidColumns into Process_fields and rework auto-fit for PID-like columns 2020-12-19 21:13:32 +01:00
Christian Göttsche 89473cc9ae Rework enum ProcessField
Use only one enum instead of a global and a platform specific one.
Drop Platform_numberOfFields global variable.
Set known size of Process_fields array
2020-12-19 21:13:32 +01:00
Christian Göttsche d872e36308 LinuxProcess: drop dead Process columns 2020-12-19 21:13:32 +01:00