mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* usr/bin/byobu-status:
- move tmux-specific width code into tmux case block
This commit is contained in:
parent
2897016607
commit
bfbec44a5d
2 changed files with 17 additions and 17 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue