mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu:
- support detection of tmux sessions
This commit is contained in:
parent
7034cc2d02
commit
a56fc98563
2 changed files with 5 additions and 2 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -6,6 +6,8 @@ byobu (4.40) unreleased; urgency=low
|
|||
* usr/lib/byobu/battery, usr/lib/byobu/cpu_freq, usr/lib/byobu/disk,
|
||||
usr/lib/byobu/memory, usr/share/man/man1/byobu.1:
|
||||
- save a few characters on the status line
|
||||
* usr/bin/byobu:
|
||||
- support detection of tmux sessions
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 05 Oct 2011 18:05:32 -0400
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ case $BYOBU_BACKEND in
|
|||
# Use 256 colors, unless the user has overridden
|
||||
[ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2"
|
||||
PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
|
||||
sessions=$($BYOBU_BACKEND list-sessions) || true
|
||||
;;
|
||||
*)
|
||||
# Allow override of default window list, with BYOBU_WINDOWS environment variable
|
||||
|
@ -110,17 +111,17 @@ case $BYOBU_BACKEND in
|
|||
for i in "$@"; do
|
||||
case $i in -*r*|-*d*|-*D*|-*S*|-ls|-list) NAME= ;; esac
|
||||
done
|
||||
sessions=$($BYOBU_BACKEND -wipe 2>/dev/null) || true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Now let's execute the backend!
|
||||
if [ "$#" = "0" ]; then
|
||||
out=$($BYOBU_BACKEND -wipe 2>/dev/null) || true
|
||||
if [ "$CUSTOM_WINDOW_SET" = "1" ]; then
|
||||
# Start new custom window set session
|
||||
exec $BYOBU_BACKEND $SCREEN_TERM $NAME $PROFILE
|
||||
else
|
||||
case "$out" in
|
||||
case "$sessions" in
|
||||
*\(*\)*)
|
||||
# Select and attach to an existing session
|
||||
exec byobu-select-session
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue