summaryrefslogtreecommitdiffstats
path: root/openbsd
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2021-08-31 15:38:52 +1000
committerNathan Scott <nathans@redhat.com>2021-12-07 17:04:49 +1100
commit72ba20fa5f077bab4286dd78f9944df15de3b3b4 (patch)
tree0c4fb4e63b80b3a20d5f50bdac6bed9fe2bee607 /openbsd
parentff4f44b22ae8d6522ee22599174a6cdd41bc0314 (diff)
Introduce screen tabs
This is a forward port (by nathans) of Hisham's original code.
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/OpenBSDProcessList.c2
-rw-r--r--openbsd/Platform.c10
-rw-r--r--openbsd/Platform.h4
3 files changed, 13 insertions, 3 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index af7879e3..9a21b225 100644
--- a/openbsd/OpenBSDProcessList.c
+++ b/openbsd/OpenBSDProcessList.c
@@ -309,7 +309,7 @@ static void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) {
OpenBSDProcessList_updateProcessName(this->kd, kproc, proc);
- if (settings->flags & PROCESS_FLAG_CWD) {
+ if (settings->ss->flags & PROCESS_FLAG_CWD) {
OpenBSDProcessList_updateCwd(kproc, proc);
}
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index 15467e13..b8e7ce91 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -46,7 +46,15 @@ in the source distribution for its full text.
#include "openbsd/OpenBSDProcessList.h"
-const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
+ScreenDefaults Platform_defaultScreens[] = {
+ {
+ .name = "Main",
+ .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",
+ .sortKey = "PERCENT_CPU",
+ },
+};
+
+const unsigned int Platform_numberOfDefaultScreens = ARRAYSIZE(Platform_defaultScreens);
/*
* See /usr/include/sys/signal.h
diff --git a/openbsd/Platform.h b/openbsd/Platform.h
index fd6a6575..b3612cc6 100644
--- a/openbsd/Platform.h
+++ b/openbsd/Platform.h
@@ -26,7 +26,9 @@ in the source distribution for its full text.
#include "generic/uname.h"
-extern const ProcessField Platform_defaultFields[];
+extern ScreenDefaults Platform_defaultScreens[];
+
+extern const unsigned int Platform_numberOfDefaultScreens;
/* see /usr/include/sys/signal.h */
extern const SignalItem Platform_signals[];

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