mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -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
|
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
|
-- 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
|
done
|
||||||
|
|
||||||
# Fix status printing for small terminal sizes
|
# Fix status printing for small terminal sizes
|
||||||
w=$(tmux list-windows -F "#{session_width}")
|
width=$(tmux list-windows -F "#{session_width}")
|
||||||
read w_last < $BYOBU_RUN_DIR/width || w_last=
|
w_last=0
|
||||||
if [ "$w" != "$w_last" ]; then
|
[ -r "$BYOBU_RUN_DIR/width" ] && read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2 || w_last=0
|
||||||
tmux set -g status-left-length $((w*1/4)) >/dev/null 2>&1
|
for w in $width; do
|
||||||
tmux set -g status-right-length $((w*3/4)) >/dev/null 2>&1
|
if [ "$w" != "$w_last" ]; then
|
||||||
printf "$w" > $BYOBU_RUN_DIR/width
|
tmux set -g status-left-length $(($w*1/4)) >/dev/null 2>&1
|
||||||
fi
|
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
|
case "$BYOBU_BACKEND" in
|
||||||
screen)
|
screen)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue