diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-07-29 21:14:29 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-08-07 14:20:14 +0200 |
commit | 293eec4265e1a2555bffe351c5a85d6f55f1a52b (patch) | |
tree | 7fc12e4bdad9afaf36aa11b4ab1fd075eef6f051 /Settings.c | |
parent | c33d32e66b80da0558da3fdfbfc2fe03cf5f4114 (diff) |
New setting: "Show program path"
Add a setting to hide all but the last component from the programme
path, leaving only the "basename". Makes htop more usable on smaller
screens, or systems with longer than average paths. Off by default.
"Highlight program basename" will still be respected, to further
visually separate process names from their arguments.
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -45,6 +45,7 @@ typedef struct Settings_ { bool countCPUsFromZero; bool detailedCPUTime; bool treeView; + bool showProgramPath; bool hideThreads; bool shadowOtherUsers; bool showThreadNames; @@ -185,6 +186,8 @@ static bool Settings_read(Settings* this, const char* fileName, int cpuCount) { this->shadowOtherUsers = atoi(option[1]); } else if (String_eq(option[0], "show_thread_names")) { this->showThreadNames = atoi(option[1]); + } else if (String_eq(option[0], "show_program_path")) { + this->showProgramPath = atoi(option[1]); } else if (String_eq(option[0], "highlight_base_name")) { this->highlightBaseName = atoi(option[1]); } else if (String_eq(option[0], "highlight_megabytes")) { @@ -271,6 +274,7 @@ bool Settings_write(Settings* this) { fprintf(fd, "hide_userland_threads=%d\n", (int) this->hideUserlandThreads); fprintf(fd, "shadow_other_users=%d\n", (int) this->shadowOtherUsers); fprintf(fd, "show_thread_names=%d\n", (int) this->showThreadNames); + fprintf(fd, "show_program_path=%d\n", (int) this->showProgramPath); fprintf(fd, "highlight_base_name=%d\n", (int) this->highlightBaseName); fprintf(fd, "highlight_megabytes=%d\n", (int) this->highlightMegabytes); fprintf(fd, "highlight_threads=%d\n", (int) this->highlightThreads); |