aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCody Hiar <cody.hiar@investopedia.com>2016-11-09 19:46:00 -0700
committerCody Hiar <cody.hiar@investopedia.com>2016-11-09 19:46:00 -0700
commit9ad7425bed6329c069a933653a0c12960c0c823a (patch)
treef9107d0c8a62565df98b49de89f72e36f5dd35f0 /scripts
parentd22bfebede82a9b09539b497db3ca84595b7ade6 (diff)
A couple more updates for better tmuxing
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tmux_start.sh38
-rwxr-xr-xscripts/tmux_window_renum.sh15
2 files changed, 0 insertions, 53 deletions
diff --git a/scripts/tmux_start.sh b/scripts/tmux_start.sh
deleted file mode 100755
index 924cf78..0000000
--- a/scripts/tmux_start.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#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
diff --git a/scripts/tmux_window_renum.sh b/scripts/tmux_window_renum.sh
deleted file mode 100755
index ed33584..0000000
--- a/scripts/tmux_window_renum.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-for session in $(tmux ls | awk -F: '{print $1}') ; do
- active_window=$(tmux lsw -t ${session} | awk -F: '/\(active\)$/ {print $1}')
- inum=0
- for window in $(tmux lsw -t ${session} | awk -F: '{print $1}') ;do
- if [ ${window} -gt ${inum} ] ;then
- echo "${session}:${window} -> ${session}:${inum}"
- tmux movew -d -s ${session}:${window} -t ${session}:${inum}
- fi
- if [ ${window} = ${active_window} ] ;then
- new_active_window=${inum}
- fi
- inum=$((${inum}+1))
- done
- tmux select-window -t ${session}:${new_active_window}
-done