start adding single argument to bunkdeck

This commit is contained in:
sorrel 2024-02-09 16:19:28 -05:00
parent e1b7d87b1b
commit 4b84f46a83

View file

@ -1,17 +1,39 @@
#!/bin/bash #!/bin/bash -e
set +e case $1 in
sessions=$(tmux list-sessions)
set -e
if [[ $sessions == *"bunkdeck"* ]]; then kill)
tmux attach-session -t bunkdeck # kill
exit 1 ;;
fi
tmux new -d -s bunkdeck heed restart)
tmux split-window -h -t bunkdeck -p 70 # restart
tmux split-window -t bunkdeck:0.0 -v -p 10 ;;
tmux send-keys -t bunkdeck:0.1 'proclaim' C-m
tmux send-keys -t bunkdeck:0.2 'cowsay "press [CTRL+b then o] to cycle through panes"' C-m "")
tmux attach -t bunkdeck:0.2 newDeck
;;
*)
# error
;;
esac
function newDeck {
set +e
sessions=$(tmux list-sessions)
set -e
if [[ $sessions == *"bunkdeck"* ]]; then
tmux attach-session -t bunkdeck
exit 1
fi
tmux new -d -s bunkdeck heed
tmux split-window -h -t bunkdeck -p 70
tmux split-window -t bunkdeck:0.0 -v -p 10
tmux send-keys -t bunkdeck:0.1 'proclaim' C-m
tmux send-keys -t bunkdeck:0.2 'cowsay "press [CTRL+b then o] to cycle through panes"' C-m
tmux attach -t bunkdeck:0.2
}