From becd33795c99a3f1b26024dd9fa8cc880f4d399d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 28 Aug 2021 17:57:51 +0200 Subject: 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. --- Settings.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Settings.c') 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; } -- cgit v1.2.3