From 1f806d2c1e0dabb56c03f2b943250834a7b5b18c Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 17 Dec 2008 22:08:22 -0600 Subject: [PATCH] omit the "1x" if only one cpu add some spacing between "2 x " --- bin/cpu-count | 7 ++++++- profiles/ubuntu.screenrc | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/cpu-count b/bin/cpu-count index 8771ce29..d44bb71e 100755 --- a/bin/cpu-count +++ b/bin/cpu-count @@ -1,3 +1,8 @@ #!/bin/sh -grep -c "^processor.*:" /proc/cpuinfo +count=`grep -c "^processor.*:" /proc/cpuinfo` +if [ "$count" = "1" ]; then + echo +else + echo "$count x " +fi diff --git a/profiles/ubuntu.screenrc b/profiles/ubuntu.screenrc index 74d9f086..9fcf8f71 100644 --- a/profiles/ubuntu.screenrc +++ b/profiles/ubuntu.screenrc @@ -22,4 +22,4 @@ source /usr/share/screen-profiles/profiles/common caption always '%{= Wk}%{= Wk}%?%-Lw%?%{= yk}%n %t%{= Wk} %?%+Lw%?%?%= %{= Wk}' -hardstatus string '%{= wk} %{+b r}\%{= y}o%{=b Y}/%{+b wk} %100` %{= Wk}|%= |%{+B bW}%102`%{= Wk}|%{+b rW}%101`%{= Wk}|%{g}%104`x%{+b gW}%103`%{= Wk}|%{= wk}%Y-%m-%d %c:%s' +hardstatus string '%{= wk} %{+b r}\%{= y}o%{=b Y}/%{+b wk} %100` %{= Wk}|%= |%{+B bW}%102`%{= Wk}|%{+b rW}%101`%{= Wk}|%{g}%104`%{+b gW}%103`%{= Wk}|%{= wk}%Y-%m-%d %c:%s'