Changed the way to specify .conf files

This commit is contained in:
chawley (chawley02)
2026-03-03 13:59:55 -05:00
parent 10e4ba07d5
commit f206ee5333

View File

@@ -18,7 +18,7 @@ else
fi fi
# Change this to your tmux config file if it's not in the home directory or named differently # Change this to your tmux config file if it's not in the home directory or named differently
TMUX_COMMAND="tmux -f .tmux.conf " TMUX_CONF="-f $HOME/.tmux.conf"
echo "" echo ""
echo "" echo ""
@@ -46,14 +46,14 @@ tcheck=$(tmux list-sessions | grep -c "${session}") # check if session is activ
# analytics) # <- session name # analytics) # <- session name
# if [[ $tcheck == 0 ]]; then # <- check if it's already running # if [[ $tcheck == 0 ]]; then # <- check if it's already running
# tmux new-session -d -s analytics # <- if not, create it # tmux new-session -d -s analytics # <- if not, create it
# tmux rename-window 'localhost' # <- rename the first window (local) # tmux -f "${TMUX_CONF}" rename-window 'localhost' # <- rename the first window (local)
# # ↓↓ --- define additional windows --- ↓↓ # # ↓↓ --- define additional windows --- ↓↓
# tmux new-window -t:1 -n 'lasis01' 'exec ssh lasis01' # tmux -f "${TMUX_CONF}" new-window -t:1 -n 'lasis01' 'exec ssh lasis01'
# tmux new-window -t:2 -n 'lasis01dev' 'exec ssh lasis01dev' # tmux -f "${TMUX_CONF}" new-window -t:2 -n 'lasis01dev' 'exec ssh lasis01dev'
# tmux new-window -t:3 -n 'ldssbox01' 'exec ssh ldssbox01' # tmux -f "${TMUX_CONF}" new-window -t:3 -n 'ldssbox01' 'exec ssh ldssbox01'
# tmux new-window -t:4 -n 'lpdprod01' 'exec ssh lpdprod01' # tmux -f "${TMUX_CONF}" new-window -t:4 -n 'lpdprod01' 'exec ssh lpdprod01'
# tmux new-window -t:5 -n 'ldatalake01' 'exec ssh ldatalake01' # tmux -f "${TMUX_CONF}" new-window -t:5 -n 'ldatalake01' 'exec ssh ldatalake01'
# tmux new-window -t:6 -n 'lsandbox' 'exec ssh lsandbox' # tmux -f "${TMUX_CONF}" new-window -t:6 -n 'lsandbox' 'exec ssh lsandbox'
# fi # fi
# tmux attach-session -t analytics # <- if window active, switch to it # tmux attach-session -t analytics # <- if window active, switch to it
# ;; # ;;
@@ -61,11 +61,11 @@ tcheck=$(tmux list-sessions | grep -c "${session}") # check if session is activ
case $session in case $session in
mine) mine)
if [[ $tcheck == 0 ]]; then if [[ $tcheck == 0 ]]; then
$TMUX_COMMAND new-session -d -s mine tmux -f "${TMUX_CONF}" new-session -d -s mine
$TMUX_COMMAND rename-window 'local(aristotle)' tmux -f "${TMUX_CONF}" rename-window 'local(aristotle)'
$TMUX_COMMAND new-window -t 1 -n 'root@vps' 'exec ssh root@vps.example.org' tmux -f "${TMUX_CONF}" new-window -t 1 -n 'root@vps' 'exec ssh root@vps.example.org'
$TMUX_COMMAND new-window -t:2 -n 'chawley@phaedrus' 'exec ssh chawley@phaedrus' tmux -f "${TMUX_CONF}" new-window -t:2 -n 'chawley@phaedrus' 'exec ssh chawley@phaedrus'
$TMUX_COMMAND new-window -t:3 -n 'chawley@homer' 'exec ssh chawley@homer.simpsons.net' tmux -f "${TMUX_CONF}" new-window -t:3 -n 'chawley@homer' 'exec ssh chawley@homer.simpsons.net'
fi fi
tmux attach-session -t mine tmux attach-session -t mine
;; ;;