diff --git a/bin/arch b/bin/arch index 61424998..79de39cf 100755 --- a/bin/arch +++ b/bin/arch @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is "on" -p=`basename $0` +p="cpu-count" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 count=`grep -c "^processor.*:" /proc/cpuinfo` diff --git a/bin/cpu-count b/bin/cpu-count index 61424998..521b1a64 100755 --- a/bin/cpu-count +++ b/bin/cpu-count @@ -1,6 +1,6 @@ #!/bin/sh -e # -# cpu-count: count cpu's on a systems +# arch: print the machine architecture # Copyright (C) 2008 Canonical Ltd. # # Authors: Dustin Kirkland @@ -17,9 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Default is "on" -p=`basename $0` -grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 +# Default is "off" +p="arch" +grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0 -count=`grep -c "^processor.*:" /proc/cpuinfo` -[ "$count" = "1" ] || echo $count"x" +uname -m diff --git a/bin/cpu-freq b/bin/cpu-freq index 6c4f5218..dec79174 100755 --- a/bin/cpu-freq +++ b/bin/cpu-freq @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is "on" -p=`basename $0` +p="cpu-freq" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | awk -F"[:.]" '{print $2}'` diff --git a/bin/ec2-cost b/bin/ec2-cost index 4c91274e..2be1e6d9 100755 --- a/bin/ec2-cost +++ b/bin/ec2-cost @@ -22,7 +22,7 @@ FORCE=0 DETAIL=0 # Default is "off" -p=`basename $0` +p="ec2-cost" grep -qs "^$p=1$" "$HOME/.screen-profiles/status" && FORCE=1 grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && FORCE=0 diff --git a/bin/hostname b/bin/hostname index b95d192b..ebe3ec88 100755 --- a/bin/hostname +++ b/bin/hostname @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is "off" -p=`basename $0` +p="hostname" grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0 echo "@"`hostname -s` diff --git a/bin/load-average b/bin/load-average index 5c743c3a..08cfa8a1 100755 --- a/bin/load-average +++ b/bin/load-average @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is "on" -p=`basename $0` +p="load-average" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 cat /proc/loadavg | cut -d " " -f -1 diff --git a/bin/mem-available b/bin/mem-available index 92831e7c..46fb3d6d 100755 --- a/bin/mem-available +++ b/bin/mem-available @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is on -p=`basename $0` +p="mem-available" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'` diff --git a/bin/mem-used b/bin/mem-used index 269952a9..05779809 100755 --- a/bin/mem-used +++ b/bin/mem-used @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is on -p=`basename $0` +p="mem-used" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 free | awk '/buffers\/cache:/ {printf ",%.0f%%\n", 100*$3/($3 + $4)}' diff --git a/bin/menu b/bin/menu new file mode 100755 index 00000000..c5bb494e --- /dev/null +++ b/bin/menu @@ -0,0 +1,24 @@ +#!/bin/sh -e +# +# menu: display the menu text +# Copyright (C) 2008 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Default is "on" +p="menu" +grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 + +echo `gettext "Menu:"` diff --git a/bin/reboot-required b/bin/reboot-required index 811ca6da..8a32b345 100755 --- a/bin/reboot-required +++ b/bin/reboot-required @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is on -p=`basename $0` +p="reboot-required" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 [ -e /var/run/reboot-required ] && echo "(@)" diff --git a/bin/release b/bin/release index d57a8775..9ad88127 100755 --- a/bin/release +++ b/bin/release @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is on -p=`basename $0` +p="release" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 echo $(/usr/bin/lsb_release -s -i) $(/usr/bin/lsb_release -s -r) diff --git a/bin/updates-available b/bin/updates-available index 8b39167d..a337c6dc 100755 --- a/bin/updates-available +++ b/bin/updates-available @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is on -p=`basename $0` +p="updates-available" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 # expire the cache in X seconds; 1 hour by default diff --git a/bin/whoami b/bin/whoami index 3f8242b6..c002ae21 100755 --- a/bin/whoami +++ b/bin/whoami @@ -18,7 +18,7 @@ # along with this program. If not, see . # Default is "off" -p=`basename $0` +p="whoami" grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0 whoami