In light of the discussion on #tmux and the join-pane enhancement,
I hacked together two scripts: tmux-tile-mode and tmux-monocle-mode.
tmux-tile-mode:
#!/bin/sh
TMUX="tmux -Lmain"
cur=$($TMUX display -p '#I')
first=0
$TMUX list-windows | grep -v "layout" | cut -d':' -f1 | while read LINE
do
if [[ $LINE != $cur ]]; then
if [[ $first == 0 ]]; then
first=1
$TMUX join-pane -h -d -s :$LINE -t :$cur
else
$TMUX join-pane -d -s $LINE -t :${cur}.1
fi
fi
done
tmux-monocle-mode:
#!/bin/sh
TMUX="tmux -Lmain"
while $TMUX list-panes | grep -v "(active)"
do
pane=$($TMUX list-panes | grep -v "(active)" | head -n1 | cut -d ':' -f1)
$TMUX break-pane -d -t $pane
done
Enjoy.
Peter John Hartman
http://individual.utoronto.ca/peterjh/
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users