Switch back to tmux

This commit is contained in:
Marko Korhonen 2025-07-24 09:11:42 -05:00
parent d946f3b33d
commit f4207ca303
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
4 changed files with 27 additions and 11 deletions

View file

@ -0,0 +1,15 @@
# Supports 'tmux', 'zellij', 'none'
PLEXER=tmux
if [[ "$PLEXER" == 'tmux' ]]; then
PLEXER_ACTIVE="$TMUX"
PLEXER_CMD="tmux new-session -A -s SSH"
elif [[ "$PLEXER" == 'zellij' ]]; then
PLEXER_ACTIVE="$ZELLIJ"
PLEXER_CMD="zellij attach -c SSH"
fi
# Launch or attach to existing multiplexer session if logging in over ssh
if [[ -n "$PLEXER_CMD" && -z "$PLEXER_ACTIVE" && -n "$SSH_CONNECTION" ]]; then
eval "exec $PLEXER_CMD"
fi