diff --git a/usr/bin/byobu b/usr/bin/byobu index a427c56c..33d4b402 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -40,7 +40,6 @@ printf "\033]0;${USER}@$(hostname) - ${PKG}\007" # Launch motd+shell, unless the user has default windows set to launch 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 [ -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 exec byobu-select-session fi +elif [ -s "$BYOBU_WINDOWS" ]; then + cat "$BYOBU_WINDOWS" > "$HOME/.$PKG/.windows-tmp" + exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" else exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@" fi diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 05f4f444..039f47d2 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -23,6 +23,7 @@ PKG="byobu" [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" RUN="$SOCKETDIR/S-$USER" FLAG="$RUN/$PKG.reload-required" +echo > "$HOME/.$PKG/.windows-tmp" # Exit immediately, if we're not forced, and there is no reload flag 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/windows" ] || touch "$HOME/.$PKG/windows" [ -r "$HOME/.screenrc" ] || touch "$HOME/.screenrc" -echo > "$HOME/.$PKG/.windows-tmp" # Affects: Upgrades from <= byobu-2.11 # The status scripts used to have hyphens in their name, but now use