diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-08-28 17:57:51 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-09-02 08:03:21 +0200 |
commit | becd33795c99a3f1b26024dd9fa8cc880f4d399d (patch) | |
tree | b22796a122bf08962b6ead265bce3d587f14b0ff /Settings.c | |
parent | 74f99e36937be6a69703fa9fb9d1327e45c1b6be (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.
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } |