mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
Detailed status
* bin/*: add special actions if --detail is specified; basically, print all relevant information on stdout without formatting * screen-profiles-status: add support for --detail, loop through all status scripts with --detail specified * screen-profiles-status-detail: wrapper using sensible-pager * screen-profiles-status-detail.1: documentation added Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
395e41d118
commit
3adea2d373
29 changed files with 177 additions and 16 deletions
5
bin/arch
5
bin/arch
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
uname -a
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "%s " $(uname -m)
|
printf "%s " $(uname -m)
|
||||||
|
|
|
@ -31,6 +31,14 @@ search () {
|
||||||
BATS=$(ls /proc/acpi/battery)
|
BATS=$(ls /proc/acpi/battery)
|
||||||
NB=$(echo "$BATS" | wc -l)
|
NB=$(echo "$BATS" | wc -l)
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
for bat in $BATS; do
|
||||||
|
cat "/proc/acpi/battery/$bat/info"
|
||||||
|
cat "/proc/acpi/battery/$bat/state"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
for bat in $BATS; do
|
for bat in $BATS; do
|
||||||
if [ "$NB" -gt 1 ]; then
|
if [ "$NB" -gt 1 ]; then
|
||||||
echo -n "$bat: "
|
echo -n "$bat: "
|
||||||
|
|
|
@ -19,3 +19,7 @@
|
||||||
|
|
||||||
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
||||||
[ "$count" = "1" ] || echo $count"x"
|
[ "$count" = "1" ] || echo $count"x"
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
echo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
cat /proc/cpuinfo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
mhz=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
|
mhz=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
|
||||||
|
|
||||||
speed=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }')
|
speed=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }')
|
||||||
|
|
4
bin/date
4
bin/date
|
@ -17,4 +17,8 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
date
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
printf "\005Y-\005m-\005d "
|
printf "\005Y-\005m-\005d "
|
||||||
|
|
|
@ -78,7 +78,6 @@ uptime_cost=`echo "$hours" | awk "{printf \"%f\", "$CPU_RATE" * $hours}"`
|
||||||
total_cost=`echo "$network_cost" "$uptime_cost" | awk '{printf "~\$%.2f", $1 + $2}'`
|
total_cost=`echo "$network_cost" "$uptime_cost" | awk '{printf "~\$%.2f", $1 + $2}'`
|
||||||
|
|
||||||
if [ "$DETAIL" = "1" ]; then
|
if [ "$DETAIL" = "1" ]; then
|
||||||
echo
|
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
echo "Estimated cost in Amazon's EC2 since last reboot"
|
echo "Estimated cost in Amazon's EC2 since last reboot"
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
|
@ -91,7 +90,6 @@ if [ "$DETAIL" = "1" ]; then
|
||||||
echo "------------------------------------------------"
|
echo "------------------------------------------------"
|
||||||
echo "Total cost: $total_cost"
|
echo "Total cost: $total_cost"
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
echo
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
hostname -f
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
at=
|
at=
|
||||||
grep -qs "^whoami=1$" "$HOME/.screen-profiles/status" && at="@"
|
grep -qs "^whoami=1$" "$HOME/.screen-profiles/status" && at="@"
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
cat /proc/loadavg
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\005{= Yk}%s\005{-} " $(cat /proc/loadavg | cut -d " " -f -1)
|
printf "\005{= Yk}%s\005{-} " $(cat /proc/loadavg | cut -d " " -f -1)
|
||||||
|
|
41
bin/logo
41
bin/logo
|
@ -17,32 +17,49 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
MARKUP="false"
|
||||||
|
else
|
||||||
|
MARKUP="true"
|
||||||
|
fi
|
||||||
|
|
||||||
print_logo() {
|
print_logo() {
|
||||||
distro="$1"
|
distro="$1"
|
||||||
if echo "$distro" | grep -qsi "ubuntu"; then
|
if echo "$distro" | grep -qsi "ubuntu"; then
|
||||||
printf "\005{=b kr}\\\\\005{= ky}o\005{=b kY}/"
|
$MARKUP && printf "\005{=b kr}\\\\\005{= ky}o\005{=b kY}/" || printf "\\o/"
|
||||||
elif echo "$distro" | grep -qsi "arch"; then
|
elif echo "$distro" | grep -qsi "arch"; then
|
||||||
printf "\005{=b wb} A "
|
logo=" A "
|
||||||
|
$MARKUP && printf "\005{=b wb}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "centos"; then
|
elif echo "$distro" | grep -qsi "centos"; then
|
||||||
printf "\005{= gw}*\005{= mw}*\005{= yw}*\005{= bw}*%{=b Wk}"
|
logo="****"
|
||||||
|
$MARKUP && printf "\005{= gw}*\005{= mw}*\005{= yw}*\005{= bw}*%{=b Wk}" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "debian"; then
|
elif echo "$distro" | grep -qsi "debian"; then
|
||||||
printf "\005{= wr} @ "
|
logo=" @ "
|
||||||
|
$MARKUP && printf "\005{= wr}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "fedora"; then
|
elif echo "$distro" | grep -qsi "fedora"; then
|
||||||
printf "\005{=b bw} f "
|
logo=" f "
|
||||||
|
$MARKUP && printf "\005{=b bw}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "foresight"; then
|
elif echo "$distro" | grep -qsi "foresight"; then
|
||||||
printf "\005{=b Wg}<@>"
|
logo="<@>"
|
||||||
|
$MARKUP && printf "\005{=b Wg}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "gentoo"; then
|
elif echo "$distro" | grep -qsi "gentoo"; then
|
||||||
printf "\005{=b cw} > "
|
logo=" > "
|
||||||
|
$MARKUP && printf "\005{=b cw}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "mandriva"; then
|
elif echo "$distro" | grep -qsi "mandriva"; then
|
||||||
printf "\005{=b kc} (\005{=b ky}* "
|
logo=" (* "
|
||||||
|
$MARKUP && printf "\005{=b kc} (\005{=b ky}* " || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "redhat"; then
|
elif echo "$distro" | grep -qsi "redhat"; then
|
||||||
printf "\005{= Rk} RH "
|
logo=" RH "
|
||||||
|
$MARKUP && printf "\005{= Rk}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "slackware"; then
|
elif echo "$distro" | grep -qsi "slackware"; then
|
||||||
printf "\005{=u Bk},S "
|
logo=",S "
|
||||||
|
$MARKUP && printf "\005{=u Bk}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "suse"; then
|
elif echo "$distro" | grep -qsi "suse"; then
|
||||||
printf "\005{= Wg}SuSE"
|
logo="SuSE"
|
||||||
|
$MARKUP && printf "\005{= Wg}$logo" || printf "$logo"
|
||||||
elif echo "$distro" | grep -qsi "xandros"; then
|
elif echo "$distro" | grep -qsi "xandros"; then
|
||||||
printf "\005{= Wr} X "
|
logo=" X "
|
||||||
|
$MARKUP && printf "\005{= Wr}$logo" || printf "$logo"
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
free
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
comma=
|
comma=
|
||||||
whitespace=
|
whitespace=
|
||||||
if [ -r "$HOME/.screen-profiles/status" ]; then
|
if [ -r "$HOME/.screen-profiles/status" ]; then
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
cat /proc/meminfo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
free | awk '/buffers\/cache:/ {printf "\005{= gW}%.0f%%\005{-} ", 100*$3/($3 + $4)}'
|
free | awk '/buffers\/cache:/ {printf "\005{= gW}%.0f%%\005{-} ", 100*$3/($3 + $4)}'
|
||||||
|
|
2
bin/menu
2
bin/menu
|
@ -17,4 +17,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
[ "$1" = "--detail" ] && exit 0
|
||||||
|
|
||||||
printf " \005{= kw}%s" `gettext "Menu:<F9>"`
|
printf " \005{= kw}%s" `gettext "Menu:<F9>"`
|
||||||
|
|
|
@ -21,6 +21,11 @@ cache="$HOME/.screen-profiles/network-down"
|
||||||
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
||||||
unit="kB/s"
|
unit="kB/s"
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
ifconfig "$interface"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
|
t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
|
||||||
t2=`date +%s`
|
t2=`date +%s`
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,11 @@ cache="$HOME/.screen-profiles/network-up"
|
||||||
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
||||||
unit="kB/s"
|
unit="kB/s"
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
ifconfig "$interface"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
|
t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
|
||||||
t2=`date +%s`
|
t2=`date +%s`
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
ps -ejH
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\005{= yk}%s&\005{-} " $(ps -e | wc -l)
|
printf "\005{= yk}%s&\005{-} " $(ps -e | wc -l)
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
[ -e /var/run/reboot-required ] && printf "Yes" || printf "No"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
[ -e /var/run/reboot-required ] && printf "\005{=b bW}(@)\005{-} "
|
[ -e /var/run/reboot-required ] && printf "\005{=b bW}(@)\005{-} "
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if which lsb_release >/dev/null; then
|
if which lsb_release >/dev/null; then
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
lsb_release -a 2>/dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
# If lsb_release is available, use it
|
# If lsb_release is available, use it
|
||||||
r=$(lsb_release -s -d)
|
r=$(lsb_release -s -d)
|
||||||
if echo "$r" | grep -qs "^Ubuntu .*\..*\..*$"; then
|
if echo "$r" | grep -qs "^Ubuntu .*\..*\..*$"; then
|
||||||
|
@ -31,6 +35,10 @@ if which lsb_release >/dev/null; then
|
||||||
printf "\005{=b }%s %s\005{-} " "$i" "$r"
|
printf "\005{=b }%s %s\005{-} " "$i" "$r"
|
||||||
fi
|
fi
|
||||||
elif [ -r "/etc/issue" ]; then
|
elif [ -r "/etc/issue" ]; then
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
cat /etc/issue
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
# Otherwise, grab part of /etc/issue
|
# Otherwise, grab part of /etc/issue
|
||||||
printf "\005{=b }%s\005{-} " $(head -n1 /etc/issue | awk '{print $1}')
|
printf "\005{=b }%s\005{-} " $(head -n1 /etc/issue | awk '{print $1}')
|
||||||
else
|
else
|
||||||
|
|
5
bin/time
5
bin/time
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
date
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\0050c:\005s"
|
printf "\0050c:\005s"
|
||||||
|
|
|
@ -17,6 +17,13 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
if [ -x "/usr/bin/apt-get" ]; then
|
||||||
|
/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# expire the cache in X seconds; 1 hour by default
|
# expire the cache in X seconds; 1 hour by default
|
||||||
EXPIRATION=3600
|
EXPIRATION=3600
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
uptime
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
u=$(sed "s/\..*$//" /proc/uptime)
|
u=$(sed "s/\..*$//" /proc/uptime)
|
||||||
printf "\005{= wb}"
|
printf "\005{= wb}"
|
||||||
if [ "$u" -gt 86400 ]; then
|
if [ "$u" -gt 86400 ]; then
|
||||||
|
|
|
@ -20,4 +20,9 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
who
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\005{= wr}%d#\005{-} " `who | wc -l`
|
printf "\005{= wr}%d#\005{-} " `who | wc -l`
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
whoami
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\005{=b }%s\005{-}" $(whoami)
|
printf "\005{=b }%s\005{-}" $(whoami)
|
||||||
|
|
|
@ -18,6 +18,12 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
||||||
|
|
||||||
|
if [ "$1" = "--detail" ]; then
|
||||||
|
iwconfig 2>/dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
bitrate=`iwconfig "$interface" 2>/dev/null | grep "Bit Rate." | sed "s/^.*Bit Rate.//" | sed "s/ .*$//g"`
|
bitrate=`iwconfig "$interface" 2>/dev/null | grep "Bit Rate." | sed "s/^.*Bit Rate.//" | sed "s/ .*$//g"`
|
||||||
[ -z "$bitrate" ] && bitrate="0"
|
[ -z "$bitrate" ] && bitrate="0"
|
||||||
quality=`iwconfig "$interface" 2>/dev/null | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g"`
|
quality=`iwconfig "$interface" 2>/dev/null | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g"`
|
||||||
|
|
10
debian/changelog
vendored
10
debian/changelog
vendored
|
@ -4,7 +4,15 @@ screen-profiles (1.51) unreleased; urgency=low
|
||||||
* bin/hostname: hostname -s fails sometimes, it seems
|
* bin/hostname: hostname -s fails sometimes, it seems
|
||||||
* screen: respect $SCREENRC environment variable, LP: #367250
|
* screen: respect $SCREENRC environment variable, LP: #367250
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 26 Apr 2009 12:07:41 -0500
|
Detailed status
|
||||||
|
* bin/*: add special actions if --detail is specified; basically,
|
||||||
|
print all relevant information on stdout without formatting
|
||||||
|
* screen-profiles-status: add support for --detail, loop through
|
||||||
|
all status scripts with --detail specified
|
||||||
|
* screen-profiles-status-detail: wrapper using sensible-pager
|
||||||
|
* screen-profiles-status-detail.1: documentation added
|
||||||
|
|
||||||
|
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 27 Apr 2009 21:10:40 -0500
|
||||||
|
|
||||||
screen-profiles (1.50-0ubuntu1) jaunty; urgency=low
|
screen-profiles (1.50-0ubuntu1) jaunty; urgency=low
|
||||||
|
|
||||||
|
|
1
debian/install
vendored
1
debian/install
vendored
|
@ -12,6 +12,7 @@ screen usr/bin
|
||||||
select-screen-profile usr/bin
|
select-screen-profile usr/bin
|
||||||
screen-profiles usr/bin
|
screen-profiles usr/bin
|
||||||
screen-profiles-status usr/bin
|
screen-profiles-status usr/bin
|
||||||
|
screen-profiles-status-detail usr/bin
|
||||||
screen-launcher-install usr/share/screen-profiles
|
screen-launcher-install usr/share/screen-profiles
|
||||||
screen-launcher-uninstall usr/share/screen-profiles
|
screen-launcher-uninstall usr/share/screen-profiles
|
||||||
motd+shell usr/bin
|
motd+shell usr/bin
|
||||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -57,7 +57,7 @@ binary-indep: build install
|
||||||
dh_testdir -i
|
dh_testdir -i
|
||||||
dh_testroot -i
|
dh_testroot -i
|
||||||
dh_installdocs -X.bzr -i
|
dh_installdocs -X.bzr -i
|
||||||
dh_installman -i screen-launcher.1 screen-profiles.1 select-screen-profile.1 motd+shell.1 screen-profiles-export.1 screen-profiles-status.1
|
dh_installman -i screen-launcher.1 screen-profiles.1 select-screen-profile.1 motd+shell.1 screen-profiles-export.1 screen-profiles-status.1 screen-profiles-status-detail.1
|
||||||
dh_installchangelogs -i
|
dh_installchangelogs -i
|
||||||
dh_installdebconf -i
|
dh_installdebconf -i
|
||||||
dh_compress -i
|
dh_compress -i
|
||||||
|
|
|
@ -45,3 +45,4 @@ bindkey -k k9 screen -t help 0 screen-profiles # F9 | Configuration
|
||||||
# F10 | 'toolbar' in gnome-terminal
|
# F10 | 'toolbar' in gnome-terminal
|
||||||
# F11 | 'fullscreen' in gnome-terminal
|
# F11 | 'fullscreen' in gnome-terminal
|
||||||
bindkey -k F2 lockscreen # F12 | Lock this terminal
|
bindkey -k F2 lockscreen # F12 | Lock this terminal
|
||||||
|
bind $ screen -t status 0 screen-profiles-status-detail # ctrl-a $ | show detailed status
|
||||||
|
|
|
@ -45,6 +45,18 @@ case "$P" in
|
||||||
arch|battery|ec2-cost|hostname|network-down|network-up|processes|users|whoami|wifi-quality)
|
arch|battery|ec2-cost|hostname|network-down|network-up|processes|users|whoami|wifi-quality)
|
||||||
grep -qs -m1 "^$P=1$" "$HOME/.screen-profiles/status" || exit 0
|
grep -qs -m1 "^$P=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||||
;;
|
;;
|
||||||
|
--detail)
|
||||||
|
for i in `ls "$DIR"`; do
|
||||||
|
[ "$i" = "menu" ] && continue
|
||||||
|
echo
|
||||||
|
echo " ______________________________________________________________________"
|
||||||
|
echo "/ * $i:"
|
||||||
|
out=`"$DIR"/$i --detail`
|
||||||
|
echo "$out" | sed "s/^/| /g"
|
||||||
|
echo "\\______________________________________________________________________"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
15
screen-profiles-status-detail.1
Normal file
15
screen-profiles-status-detail.1
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
.TH screen-profiles-status-detail 1 "27 Apr 2009" screen-profiles "screen-profiles"
|
||||||
|
.SH NAME
|
||||||
|
screen\-profiles\-status\-detail \- Wrapper that uses a sensible pager
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fBscreen\-profiles\-status\-detail\fP is a simple script that uses a sensible pager for displaying the detailed status of all screen\-profiles status scripts.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIhttp://launchpad.net/screen-profiles\fP
|
||||||
|
.PD
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
This manpage and the utility was written by Dustin Kirkland <kirkland@canonical.com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.
|
||||||
|
|
||||||
|
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
|
Loading…
Add table
Add a link
Reference in a new issue