From 07fc2644a237187dd4c5680e88f4adadbf533603 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Wed, 12 Aug 2015 12:06:23 -0600 Subject: Initial commit of the working files --- scripts/tmux_start.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 scripts/tmux_start.sh (limited to 'scripts/tmux_start.sh') diff --git a/scripts/tmux_start.sh b/scripts/tmux_start.sh new file mode 100755 index 0000000..bbf33c5 --- /dev/null +++ b/scripts/tmux_start.sh @@ -0,0 +1,38 @@ +#!/bin/sh +#from http://www.huyng.com/posts/productivity-boost-with-tmux-iterm2-workspaces/ +export PATH=$PATH:/usr/local/bin + +# abort if we're already inside a TMUX session +[ "$TMUX" == "" ] || exit 0 + +# startup a "default" session if none currently exists +#tmux has-session -t _default || tmux new-session -s _default -d + +# present menu for user to choose which workspace to open +PS3="Please choose your session: " +options=("tmux" "dashboard" $(tmux list-sessions -F "#S")) +echo "Available sessions" +echo "------------------" +echo " " +select opt in "${options[@]}" +do + case $opt in + #"NEW SESSION") + #read -p "Enter new session name: " SESSION_NAME + #tmux new -s "$SESSION_NAME" + #break + #;; + "dashboard") + tmuxomatic ~/.tmux/tmuxomatic/dashboard + break + ;; + "tmux") + tmux + break + ;; + *) + tmux attach-session -t $opt + break + ;; + esac +done -- cgit v1.2.3