mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-status: LP: #997766
- handle status wider than terminal more gracefully
This commit is contained in:
parent
4d7891d3c0
commit
0618d5660b
2 changed files with 11 additions and 1 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
|||
byobu (5.18) unreleased; urgency=low
|
||||
|
||||
* UNRELEASED
|
||||
* usr/bin/byobu-status: LP: #997766
|
||||
- handle status wider than terminal more gracefully
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 03 Apr 2012 19:22:04 -0500
|
||||
|
||||
|
|
|
@ -35,6 +35,15 @@ for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/
|
|||
[ -r "$i" ] && . "$i"
|
||||
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
|
||||
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
# Reload profile, if necessary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue