* usr/bin/byobu.in, usr/share/man/man1/byobu.1: LP: #907363

- fix custom window support for byobu-tmux
This commit is contained in:
Dustin Kirkland 2014-08-05 22:52:00 +02:00
commit af180e08e2
3 changed files with 26 additions and 4 deletions

4
debian/changelog vendored
View file

@ -13,6 +13,10 @@ byobu (5.85) unreleased; urgency=medium
* usr/bin/byobu-layout.in:
- add a list-layouts command
[ Dustin Kirkland ]
* usr/bin/byobu.in, usr/share/man/man1/byobu.1: LP: #907363
- fix custom window support for byobu-tmux
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 28 Jul 2014 09:12:13 +0100
byobu (5.84-0ubuntu1) utopic; urgency=medium

View file

@ -115,6 +115,14 @@ case $BYOBU_BACKEND in
BYOBU_PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
DEFAULT_WINDOW="new-session -n $BYOBU_WINDOW_NAME ${BYOBU_PREFIX}/bin/byobu-shell"
sessions=$($BYOBU_BACKEND list-sessions 2>/dev/null) || true
CUSTOM_WINDOW_SET=0
if [ -s "$BYOBU_CONFIG_DIR/windows.tmux.$BYOBU_WINDOWS" ]; then
CUSTOM_WINDOW_SET=1
BYOBU_WINDOWS="$BYOBU_CONFIG_DIR/windows.tmux.$BYOBU_WINDOWS"
elif [ -s "$BYOBU_CONFIG_DIR/windows.tmux" ]; then
CUSTOM_WINDOW_SET=1
BYOBU_WINDOWS="$BYOBU_CONFIG_DIR/windows.tmux"
fi
;;
screen)
# Allow override of default window list, with BYOBU_WINDOWS environment variable
@ -168,7 +176,7 @@ if [ "$#" = "0" ]; then
# Start new custom window set session
case $BYOBU_BACKEND in
tmux)
exec tmux $SCREEN_TERM $BYOBU_PROFILE
exec tmux $SCREEN_TERM $BYOBU_PROFILE $(cat "$BYOBU_WINDOWS")
;;
screen)
exec screen $SCREEN_TERM $BYOBU_SESSION_NAME $BYOBU_PROFILE

View file

@ -119,11 +119,11 @@ Byobu name screen sessions "byobu", if unspecified. To hide sessions from \fBby
.SH WINDOWS
Each open window in the screen session is displayed in the upper bar toward the far left. These are numbered, and include indicators as to activity in the window (see "activity" in \fBscreen\fP(1) for symbol definitions). The current active window is highlighted by inverting the background/text from the rest of the window bar.
Each open window in the screen session is displayed in the upper bar toward the far left. These are numbered, and include indicators as to activity in the window (see "activity" in \fBscreen\fP(1) and \fBtmux\fP(1) for symbol definitions). The current active window is highlighted by inverting the background/text from the rest of the window bar.
Users can create a list of windows to launch at startup in \fI$BYOBU_CONFIG_DIR/windows\fP. This file is the same syntax as \fI~/.screenrc\fP, each line specifying a window using the "screen" command, as described in \fBscreen\fP(1).
Users can create a list of windows to launch at startup in \fI$BYOBU_CONFIG_DIR/windows\fP and \fI$BYOBU_CONFIG_DIR/windows.tmux\fP. This file is the same syntax as \fI~/.screenrc\fP and \fI~/.tmuxrc\fP, each line specifying a window, as described in \fBscreen\fP(1) or \fBtmux\fP(1).
User can also launch Byobu with unique window sets. Users can store these as \fI$BYOBU_CONFIG_DIR/windows.[NAME]\fP, and launch Byobu with the environment variable \fBBYOBU_WINDOWS\fP.
User can also launch Byobu with unique window sets. Users can store these as \fI$BYOBU_CONFIG_DIR/windows.[NAME]\fP and \fI$BYOBU_CONFIG_DIR/windows.tmux.[NAME]\fP, and launch Byobu with the environment variable \fBBYOBU_WINDOWS\fP=NAME.
For example:
$ cat $BYOBU_CONFIG_DIR/windows.ssh_sessions
@ -133,6 +133,16 @@ For example:
screen \-t collie ssh root@collie
$ BYOBU_WINDOWS=ssh_sessions byobu
For example:
$ cat $BYOBU_CONFIG_DIR/windows.tmux.split4
new-session 'bash' ;
split-window ;
split-window ;
split-window ;
select-layout tiled ;
select-pane -t 0
$ BYOBU_WINDOWS=split4 byobu
.SH UNITS OF MEASURE
byobu uses binary for capacity measurements of KB, MB, GB, and TB. This means multiples of 1024 rather than multiples of 1000, in accordance with JEDEC Standard 100B.01 for disk and memory capacity measurements. See:
* http://en.wikipedia.org/wiki/JEDEC_memory_standards