Initial version had some bit that didn't exit correctly. Finally debugged and now updated here.
13 lines
915 B
Bash
13 lines
915 B
Bash
#!/bin/bash
|
|
|
|
tmux new -s sessionname -d # create new session with a name and detach
|
|
tmux rename-window -t sessionname:0 "This is window foo." # rename (default) window 0 of foo to something cool
|
|
tmux split-window -t sessionname:0 -v -p 60 # split into top and bottom panes with 60/40 row split
|
|
tmux send-keys -t sessionname:0.0 'top' 'C-m' # run a thing in the top pane, can use 'C-m' or 'Enter'
|
|
tmux send-keys -t sessionname:0.1 'script.bs $@' 'C-m' # run another thing in the bottom pane, passing through cli arguments
|
|
|
|
tmux attach -t sessionname # jump into the active session to watch things happen
|
|
|
|
tmux send-keys -t sessionname:0.0 'q' 'C-m' # tell 'top' in top pane to quit (C-m probably not needed here...)
|
|
tmux kill-session -t sessionname # close tmux session
|