Add support for $HTOPRC, as suggested by Luis Limon

This commit is contained in:
Hisham Muhammad 2006-05-06 23:19:26 +00:00
parent 33113fe0d7
commit 723bddfb87
1 changed files with 6 additions and 1 deletions

View File

@ -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 = "";
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;