mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
enable custom window lists
This commit is contained in:
parent
28aab33ec7
commit
853837d354
2 changed files with 4 additions and 2 deletions
|
@ -40,7 +40,6 @@ printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
|
||||||
|
|
||||||
# Launch motd+shell, unless the user has default windows set to launch
|
# Launch motd+shell, unless the user has default windows set to launch
|
||||||
grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell"
|
grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell"
|
||||||
[ -r "$BYOBU_WINDOWS" ] && cat "$BYOBU_WINDOWS" > "$HOME/.$PKG/.windows-tmp"
|
|
||||||
|
|
||||||
# Check if our terminfo supports 256 colors
|
# Check if our terminfo supports 256 colors
|
||||||
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors 2>/dev/null || echo 0) -eq 256 ] && SCREEN_TERM="-T screen-256color"
|
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors 2>/dev/null || echo 0) -eq 256 ] && SCREEN_TERM="-T screen-256color"
|
||||||
|
@ -66,6 +65,9 @@ if [ "$#" = "0" ]; then
|
||||||
# Select and attach to an existing session
|
# Select and attach to an existing session
|
||||||
exec byobu-select-session
|
exec byobu-select-session
|
||||||
fi
|
fi
|
||||||
|
elif [ -s "$BYOBU_WINDOWS" ]; then
|
||||||
|
cat "$BYOBU_WINDOWS" > "$HOME/.$PKG/.windows-tmp"
|
||||||
|
exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc"
|
||||||
else
|
else
|
||||||
exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@"
|
exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -23,6 +23,7 @@ PKG="byobu"
|
||||||
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
|
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
|
||||||
RUN="$SOCKETDIR/S-$USER"
|
RUN="$SOCKETDIR/S-$USER"
|
||||||
FLAG="$RUN/$PKG.reload-required"
|
FLAG="$RUN/$PKG.reload-required"
|
||||||
|
echo > "$HOME/.$PKG/.windows-tmp"
|
||||||
|
|
||||||
# Exit immediately, if we're not forced, and there is no reload flag
|
# Exit immediately, if we're not forced, and there is no reload flag
|
||||||
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
||||||
|
@ -90,7 +91,6 @@ fi
|
||||||
[ -r "$HOME/.$PKG/status" ] || $(grep -A 999999 BEGIN_CUT_HERE /etc/$PKG/statusrc | grep -B 999999 END_CUT_HERE | grep -v CUT > "$HOME/.$PKG/status")
|
[ -r "$HOME/.$PKG/status" ] || $(grep -A 999999 BEGIN_CUT_HERE /etc/$PKG/statusrc | grep -B 999999 END_CUT_HERE | grep -v CUT > "$HOME/.$PKG/status")
|
||||||
[ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows"
|
[ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows"
|
||||||
[ -r "$HOME/.screenrc" ] || touch "$HOME/.screenrc"
|
[ -r "$HOME/.screenrc" ] || touch "$HOME/.screenrc"
|
||||||
echo > "$HOME/.$PKG/.windows-tmp"
|
|
||||||
|
|
||||||
# Affects: Upgrades from <= byobu-2.11
|
# Affects: Upgrades from <= byobu-2.11
|
||||||
# The status scripts used to have hyphens in their name, but now use
|
# The status scripts used to have hyphens in their name, but now use
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue