summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvaldaarhun <icegambit91@gmail.com>2022-07-03 18:20:33 +0530
committercgzones <cgzones@googlemail.com>2022-08-29 19:19:35 +0200
commitd078ba15a234228898f1683a2c22eb90ba446a4d (patch)
tree2bac115b48f7d718576e59f6ee9e3255a43dd4b5
parent62d59403d92abaf256604bfc17e76c85ce64ea35 (diff)
TUI-setup for 'hide running in container' option
-rw-r--r--DisplayOptionsPanel.c1
-rw-r--r--Settings.c4
-rw-r--r--Settings.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index fc23cb65..3b9e6cc4 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -116,6 +116,7 @@ DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager*
Panel_add(super, (Object*) CheckItem_newByRef("Shadow other users' processes", &(settings->shadowOtherUsers)));
Panel_add(super, (Object*) CheckItem_newByRef("Hide kernel threads", &(settings->hideKernelThreads)));
Panel_add(super, (Object*) CheckItem_newByRef("Hide userland process threads", &(settings->hideUserlandThreads)));
+ Panel_add(super, (Object*) CheckItem_newByRef("Hide processes running in containers", &(settings->hideRunningInContainer)));
Panel_add(super, (Object*) CheckItem_newByRef("Display threads in a different color", &(settings->highlightThreads)));
Panel_add(super, (Object*) CheckItem_newByRef("Show custom thread names", &(settings->showThreadNames)));
Panel_add(super, (Object*) CheckItem_newByRef("Show program path", &(settings->showProgramPath)));
diff --git a/Settings.c b/Settings.c
index aefd9e3c..b6b1864c 100644
--- a/Settings.c
+++ b/Settings.c
@@ -382,6 +382,8 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
this->hideKernelThreads = atoi(option[1]);
} else if (String_eq(option[0], "hide_userland_threads")) {
this->hideUserlandThreads = atoi(option[1]);
+ } else if (String_eq(option[0], "hide_running_in_container")) {
+ this->hideRunningInContainer = atoi(option[1]);
} else if (String_eq(option[0], "shadow_other_users")) {
this->shadowOtherUsers = atoi(option[1]);
} else if (String_eq(option[0], "show_thread_names")) {
@@ -576,6 +578,7 @@ int Settings_write(const Settings* this, bool onCrash) {
fprintf(fd, "fields="); writeFields(fd, this->screens[0]->fields, this->dynamicColumns, false, separator);
printSettingInteger("hide_kernel_threads", this->hideKernelThreads);
printSettingInteger("hide_userland_threads", this->hideUserlandThreads);
+ printSettingInteger("hide_running_in_container", this->hideRunningInContainer);
printSettingInteger("shadow_other_users", this->shadowOtherUsers);
printSettingInteger("show_thread_names", this->showThreadNames);
printSettingInteger("show_program_path", this->showProgramPath);
@@ -669,6 +672,7 @@ Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns)
this->showThreadNames = false;
this->hideKernelThreads = true;
this->hideUserlandThreads = false;
+ this->hideRunningInContainer = false;
this->highlightBaseName = false;
this->highlightDeletedExe = true;
this->highlightMegabytes = true;
diff --git a/Settings.h b/Settings.h
index facd3f2a..f6a6ea65 100644
--- a/Settings.h
+++ b/Settings.h
@@ -73,6 +73,7 @@ typedef struct Settings_ {
bool shadowOtherUsers;
bool showThreadNames;
bool hideKernelThreads;
+ bool hideRunningInContainer;
bool hideUserlandThreads;
bool highlightBaseName;
bool highlightDeletedExe;

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