]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
htoprc: automatically switch to 4-column CPU layout
authorSimon Ruderich <simon@ruderich.org>
Thu, 2 Jan 2020 15:19:19 +0000 (16:19 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 2 Jan 2020 15:19:19 +0000 (16:19 +0100)
shell/setup.sh

index e8cff62e78da7cfd79b6fc429779fd9ba12e9bd0..9f622f71494031bd86fb8c2de4a9f8a6a1ce8a76 100755 (executable)
@@ -233,6 +233,9 @@ fi
 
 # Htop overwrites the comments in its configuration file.
 generate htoprc .in cat
+if installed nproc && test "$(nproc)" -gt 8; then
+    sed_i 's/LeftCPUs/LeftCPUs2/; s/RightCPUs/RightCPUs2/' htoprc
+fi
 
 if installed dig; then
     # dig doesn't support any comments in digrc.