summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-08-28 17:57:51 +0200
committerBenBE <BenBE@geshi.org>2021-09-02 08:03:21 +0200
commitbecd33795c99a3f1b26024dd9fa8cc880f4d399d (patch)
treeb22796a122bf08962b6ead265bce3d587f14b0ff
parent74f99e36937be6a69703fa9fb9d1327e45c1b6be (diff)
Settings: create default meters on no existing config file
If htop is started for the first time and no configuration file exists the header is empty cause no meters are added as a default. Add the default meters if parsing all available configuration paths failed.
-rw-r--r--Settings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Settings.c b/Settings.c
index 2786a829..7ef314d0 100644
--- a/Settings.c
+++ b/Settings.c
@@ -543,6 +543,9 @@ Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns)
this->changed = true;
Settings_read(this, SYSCONFDIR "/htoprc", initialCpuCount);
}
+ if (!ok) {
+ Settings_defaultMeters(this, initialCpuCount);
+ }
return this;
}

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