diff --git a/byobu-status b/byobu-status index 2e543e45..1026ba84 100755 --- a/byobu-status +++ b/byobu-status @@ -37,10 +37,6 @@ else fi P="$1" -B='\033[34;1m' -W='\033[47m' -X='\033[0m' -HR=" " case "$P" in # default = on, user must override to turn off @@ -52,16 +48,19 @@ case "$P" in grep -qs -m1 "^$P=1$" "$HOME/.$PKG/status" || exit 0 ;; --detail) - printf "\033[1m" - [ -x "/usr/bin/dpkg-query" ] && /usr/bin/dpkg-query --show $PKG | awk '{print "# $PKG (" $2 ") detailed status:"}' - printf "$X\n" + if [ -x "/usr/bin/dpkg-query" ]; then + /usr/bin/dpkg-query --show $PKG | awk '{print $1 "-" $2 " detailed status:"}' + else + printf "$PKG detailed status:" + fi + printf "\n" for i in `ls "$DIR"`; do [ "$i" = "menu" ] && continue - printf "\n$W%s$X\n" "$HR" - printf "$W $X $B# %s:$X\n" "$i" - out=`"$DIR"/$i --detail | sed 's/^/\\\033[47m \\\033[0m /g'` || true - printf "$out\n" - printf "$W%s$X\n\n" "$HR" + short=`"$DIR"/$i --short | sed 's/ $//' | sed 's/.{[^}]*}//g' | sed 's/^/\t/g'` || true + detail=`"$DIR"/$i --detail | sed '/^$/d' | sed 's/^/\t/g'` || true + printf "%-20s - %s\n" "$i" "$short" + [ -n "$short" ] && printf "%s\n" "$short" + [ -n "$detail" ] && printf "%s\n" "$detail" done exit 0 ;; diff --git a/debian/changelog b/debian/changelog index 1ee9a690..00ca0bc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,29 @@ -byobu (2.1) jaunty; urgency=low +byobu (2.1) unreleased; urgency=low * byobu-export: touch an empty .byobu/profile, silence error message - -- Dustin Kirkland Wed, 06 May 2009 15:33:47 -0500 + Tranform byobu-status --detail to use vim's folding feature + * byobu-status: output text compatible with vim's folding feature + * byobu-status-detail: use vim's folding status feature to allow + for collapsing/expanding each status item; fall back on + sensible-pager if +folding is not available; and fall back on less + if sensible-pager is not available + * bin/cpu-count: nothing to print on --detail + * bin/date: add --short which actually prints the current date + * bin/ec2-cost: handle on/off configuration like *all* other status + scripts, no need for FORCE + * bin/ip-address: --detail shows all inet addr's in ifconfig + * bin/logo: --detail should be empty + * bin/network-down, bin/network-up: trim leading and trailing whitespace + * bin/reboot-required: add a --short option, which prints Yes or No + * bin/time: add --short which actually prints the current time + rather than the screen escape sequence + * bin/updates-available: add a --short option, which only displays the + number of updates available; show more info on --detail about upgrades + * bin/users: grep out the grep statement in the ps + * bin/whoami: print /etc/passwd info on --detail + + -- Dustin Kirkland Wed, 06 May 2009 21:01:56 -0500 byobu (2.0-0ubuntu1) karmic; urgency=low