From 9da3a6cca623bb8d0a8cc75d6e7e1333e55d0cf6 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 3 May 2010 09:28:44 -0500 Subject: [PATCH] move custom window handling up a bit --- usr/bin/byobu | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr/bin/byobu b/usr/bin/byobu index 33d4b402..254470c1 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -58,16 +58,17 @@ if [ "$#" = "0" ]; then else NO_SOCKETS="^No Sockets found in " fi - if echo "$out" | LANG=C grep -qsi "$NO_SOCKETS"; then + if [ -s "$BYOBU_WINDOWS" ]; then + # Launch with custom window set + cat "$BYOBU_WINDOWS" > "$HOME/.$PKG/.windows-tmp" + exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" + elif echo "$out" | LANG=C grep -qsi "$NO_SOCKETS"; then # Start new session exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW else # 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