Commit Graph

165 Commits

Author SHA1 Message Date
Christian Göttsche 4f7d48aa24 Set locale only once and do not override it later 2020-12-02 22:08:25 +01:00
Christian Göttsche 19b5141685 Hide process selection on ESC
Do not highlight the current process line after pressing ESC in the main
screen.
Restore after pressing any key.
2020-11-28 19:49:38 +01:00
Nathan Scott fee217551c Drop unneeded parameters to the ScreenManager constructor
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-26 23:55:53 +01:00
Christian Göttsche 267014cbfe Add support to change numeric options in settings screen
Like delay or highlightDelaySecs
2020-11-25 20:46:27 +01:00
Daniel Lange 95f553b10c Move treeView setting to make status bar item correct when using --sort-key, patch from @cgzones
Closes #340
2020-11-24 15:53:36 +01:00
Nathan Scott 003f2c06a4 Merge branch 'cleanup-init-done' into master 2020-11-23 17:34:44 +11:00
Christian Göttsche 7cf5277594 IWYU update (Linux) 2020-11-19 23:51:50 +01:00
Nathan Scott c75c5ef9c6 Minor cleanups to platform-specific init and done
Move platform-specific code out of the htop.c main function
and into the platform sub-directories - primarily this is
the Linux procfs path check and sensors setup/teardown; not
needed on any other platforms.  No functional changes here.
2020-11-19 12:32:07 +11:00
Christian Göttsche f720868998 Align command line argument descriptions in help output
Also drop #link comment
2020-11-18 13:59:36 +01:00
Christian Göttsche b3b890f546 Use 0 as no-match value for sortkey
Field numbers start at 1, and using -1 as no-match special value triggers
static analyzers using a potential negative array access.
2020-11-17 13:06:31 +01:00
Christian Göttsche 1b225cd7a0 Show CPU temperature in CPU meter
Show the CPU temperature in the CPU meter, like CPU frequency, instead
of using an extra Meter.
2020-11-16 16:38:54 +01:00
Daniel Lange 0951090fa4 Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processes 2020-11-16 12:55:07 +01:00
Benny Baumann 45869513bf Embracing branches 2020-11-02 22:15:01 +01:00
Benny Baumann 61e14d4bb2 Spacing around operators 2020-11-02 22:15:01 +01:00
Benny Baumann 374edb9ed5 Spacing after keywords (if) 2020-11-02 22:14:59 +01:00
Benny Baumann 0a51eae11f Spacing after keywords (while) 2020-11-02 22:14:26 +01:00
Adam Saponara a83f515f0f Address items from review 2020-10-31 20:36:53 -04:00
Erdem Ersoy 59ef15b2ad Fix segmentation fault when column name is NULL.
So, some columns (ex: SECATTR) can be sortable now.
2020-10-31 18:34:34 +01:00
Adam Saponara dde71c6637 Highlight new and old processes (#74) 2020-10-30 21:56:16 -04:00
Daniel Lange 0ea18a6edb Merge branch 'Xalloc_Cleanup' of cgzones/htop 2020-10-20 10:23:47 +02:00
Christian Göttsche 4c66eb6d4c XUtils string related updates
- allow count out-parameter of String_split() to be NULL
- introduce xStrndup()
- do not allow NULL pointers passed to String_eq()
  it is not used in any code
- implement String_startsWith(), String_contains_i() and String_eq()
  as inline header functions
- adjust several conversion issues
2020-10-19 15:38:45 +02:00
Christian Göttsche 96e2a4259e Continue to update generic data in paused mode
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.

Improves: #214
Closes: #253
2020-10-19 14:45:39 +02:00
Benny Baumann 0f5262917f Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-18 20:09:05 +02:00
Benny Baumann 872e542f4e Rename StringUtils.[ch] to XUtils.[ch] 2020-10-16 20:30:21 +02:00
Benny Baumann c6f04a9c5d Move xAsprintf, xSnprintf and xStrdup to StringUtils.h 2020-10-16 20:29:45 +02:00
Christian Göttsche af4f58d013 Misc conversion fixes 2020-10-16 19:16:53 +02:00
Christian Göttsche b47bc667a2 Add key to pause process list updates 2020-10-12 13:04:00 +02:00
laydervus fbf6424e64 Option to set initial filter
Closes #219
2020-10-07 10:34:25 +02:00
Daniel Lange 7758774890 Add Copyright statement to --help (needed as it has the license info) 2020-10-05 12:31:24 +02:00
Daniel Lange 079c2abf8e Update License consistently to GPLv2 as per COPYING file 2020-10-05 10:13:12 +02:00
Christian Göttsche b82a13c6ba Add clang analyzer CI job 2020-10-03 19:04:27 +02:00
Christian Göttsche 6a03cd237a Avoid warning about unreachable break statement
htop.c:112:13: warning: 'break' will never be executed [-Wunreachable-code-break]
            break;
            ^~~~~
htop.c:109:13: warning: 'break' will never be executed [-Wunreachable-code-break]
            break;
            ^~~~~
2020-09-24 20:14:17 +02:00
Christian Göttsche f4e1f4619f Add DeepCode inline suppression
We just want a non-NUll pointer in the matching pid hashtable.
The pointer is not dereferenced anyways.
2020-09-24 20:04:47 +02:00
Christian Göttsche e719a85994 Mark noreturn functions 2020-09-18 12:28:40 +02:00
Christian Göttsche c3952e7c20 Use strict function prototypes
int foo(); declares a function taking any number of arguments.
2020-09-18 12:28:40 +02:00
Christian Göttsche dd6500c7c7 Sort option in help message 2020-09-18 12:27:45 +02:00
Christian Göttsche f6b0efded5 Convert short version option to capital V
v is generally used for enabling verbose mode
2020-09-18 12:27:45 +02:00
Michael F. Schönitzer 1061bd719a Change option '-m' to '-M' for consistency of cli
`-m` was added as short option for `--no-mouse`, this is inconsistence
to the rest of the cli since otherwise the short options to disable a
feature are capital letters. Therefore this commit renames the option to
`-M`.

This commit also documents the option in the man page.
2020-09-18 12:04:21 +02:00
Christian Göttsche 71c068ad28 Free movingBar memory on exit 2020-09-17 22:04:11 +02:00
Christian Göttsche 1f5bd5c4c8 Avoid modifying optarg
It might be working, but lets rather not modify getopt's global variable
`optarg`.

Also there is no need to call `getenv("USER")`, just use `geteuid()`.
2020-09-17 21:55:26 +02:00
Nathan Scott 4597332959 Switch variable/field naming from WhiteList to MatchList 2020-09-09 19:38:15 +10:00
Nathan Scott 0750ff7e76 Fix regression in -u optional-argument handling
Resolves https://github.com/htop-dev/htop/issues/91
2020-09-04 09:50:18 +10:00
Christian Hesse db5adbeae0 add option (-U, --no-unicode) to disable unicode at runtime 2020-09-01 10:09:00 +02:00
Nathan Scott 47a7d0bd74 Merge branch 'configure' of https://github.com/cgzones/htop into cgzones-configure 2020-08-31 17:13:37 +10:00
Nathan Scott 0a835e13bf Simplify the --version output, old dates are confusing people
Drop the copyright notice from the version output as a number
of people seem to be confused by what this means, and we can
do without all the (well intentioned) bug reports.
2020-08-31 16:14:23 +10:00
Christian Göttsche 5bee902665 Drop configure option --enable-proc
Move to HTOP_LINUX, as --enable-proc implies my_htop_platform=linux, and
the Linux features do not work without a proc fs.
2020-08-28 13:10:16 +02:00
Nathan Scott cca07e9bc9 Merge branch 'hishamhm-pull-1011' 2020-08-20 15:18:20 +10:00
Nathan Scott 011125dab2 Merge branch 'hishamhm-pull-923' 2020-08-20 14:42:18 +10:00
Nathan Scott a82fd262d7 Merge branch 'hishamhm-pull-960' 2020-08-20 14:19:53 +10:00
Nathan Scott fb679dfb18 Merge branch 'hishamhm-pull-884' 2020-08-20 13:57:09 +10:00