diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2006-05-06 23:19:26 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2006-05-06 23:19:26 +0000 |
commit | 723bddfb87d739f2002a8cabeffab1533d903caf (patch) | |
tree | d7a5761e40fab77681fdbcba1f3534d436149470 | |
parent | 33113fe0d73ea3299843b483f108ef5bcfcc944f (diff) |
Add support for $HTOPRC, as suggested by Luis Limon
-rw-r--r-- | Settings.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -32,10 +32,15 @@ Settings* Settings_new(ProcessList* pl, Header* header) { this->pl = pl; this->header = header; char* home; + char* homerc; home = getenv("HOME_ETC"); if (!home) home = getenv("HOME"); if (!home) home = ""; - this->userSettings = String_cat(home, "/.htoprc"); + rcfile = getenv("HOMERC"); + if (!rcfile) + this->userSettings = String_cat(home, "/.htoprc"); + else + this->userSettings = String_copy(rcfile); this->colorScheme = 0; this->changed = false; this->delay = DEFAULT_DELAY; |