* usr/bin/byobu-status:

- move tmux-specific width code into tmux case block
This commit is contained in:
Dustin Kirkland 2013-01-09 10:47:06 -06:00
commit bfbec44a5d
2 changed files with 17 additions and 17 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (5.25) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu-status:
- move tmux-specific width code into tmux case block
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 09 Jan 2013 09:49:47 -0600

View file

@ -35,7 +35,18 @@ for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/
[ -r "$i" ] && . "$i"
done
# Fix status printing for small terminal sizes
case "$BYOBU_BACKEND" in
screen)
# Reload profile, if necessary
if [ -e "/var/run/screen/S-$USER/$PKG.reload-required" ] || [ -e "$BYOBU_RUN_DIR/reload-required" ]; then
if [ -r "$BYOBU_CONFIG_DIR/profile" ]; then
# If the forced janitorial steps succeed, try a profile reload
byobu-janitor --force && screen -X at 0 source "$BYOBU_CONFIG_DIR/profile" >/dev/null 2>&1
fi
fi
;;
tmux)
# Fix status printing for small terminal sizes in tmux
width=$(tmux list-windows -F "#{session_width}")
if [ -r "$BYOBU_RUN_DIR/width" ]; then
read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2
@ -50,18 +61,6 @@ for w in $width; do
break
fi
done
case "$BYOBU_BACKEND" in
screen)
# Reload profile, if necessary
if [ -e "/var/run/screen/S-$USER/$PKG.reload-required" ] || [ -e "$BYOBU_RUN_DIR/reload-required" ]; then
if [ -r "$BYOBU_CONFIG_DIR/profile" ]; then
# If the forced janitorial steps succeed, try a profile reload
byobu-janitor --force && screen -X at 0 source "$BYOBU_CONFIG_DIR/profile" >/dev/null 2>&1
fi
fi
;;
tmux)
# Do first-run procedures, if necessary
if [ -n "$TMUX" ]; then
if [ ! -e "$BYOBU_RUN_DIR/${TMUX#*,}" ]; then