Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (22 sloc) 608 Bytes
function start-tmux {
name=${1:-"awesome-town"}
tmux new-session -d -s $name
tmux rename-window -t $name:0 'editor'
tmux new-window -t $name:1 -n 'shell'
tmux new-window -t $name:2 -n 'server'
tmux new-window -t $name:3 -n 'other'
tmux select-window -t $name:1
tmux select-window -t $name:0
tmux -2 attach-session -t $name
}
function tmux-each-window {
for window in $(tmux list-windows | grep -v '^ *layout' | cut -d: -f1); do
tmux select-window -t $window
for arg in $@; do
tmux send-keys $arg
tmux send-keys " "
done
tmux send-keys " "
done
}