mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-status:
- fix upgrades to the new width handling, where some things were undefined
This commit is contained in:
parent
732d104594
commit
343064e751
2 changed files with 14 additions and 8 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,6 +1,8 @@
|
|||
byobu (5.20) unreleased; urgency=low
|
||||
|
||||
* UNRELEASED
|
||||
* usr/bin/byobu-status:
|
||||
- fix upgrades to the new width handling, where some things
|
||||
were undefined
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Jun 2012 17:25:23 -0500
|
||||
|
||||
|
|
|
@ -36,13 +36,17 @@ for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/
|
|||
done
|
||||
|
||||
# Fix status printing for small terminal sizes
|
||||
w=$(tmux list-windows -F "#{session_width}")
|
||||
read w_last < $BYOBU_RUN_DIR/width || w_last=
|
||||
if [ "$w" != "$w_last" ]; then
|
||||
tmux set -g status-left-length $((w*1/4)) >/dev/null 2>&1
|
||||
tmux set -g status-right-length $((w*3/4)) >/dev/null 2>&1
|
||||
printf "$w" > $BYOBU_RUN_DIR/width
|
||||
fi
|
||||
width=$(tmux list-windows -F "#{session_width}")
|
||||
w_last=0
|
||||
[ -r "$BYOBU_RUN_DIR/width" ] && read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2 || w_last=0
|
||||
for w in $width; do
|
||||
if [ "$w" != "$w_last" ]; then
|
||||
tmux set -g status-left-length $(($w*1/4)) >/dev/null 2>&1
|
||||
tmux set -g status-right-length $(($w*3/4)) >/dev/null 2>&1
|
||||
printf "$w" > $BYOBU_RUN_DIR/width
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue