feat(tmux): if ssh create new tmux session
This commit is contained in:
parent
035a006a72
commit
5d58745a09
@ -7,11 +7,19 @@ if \
|
||||
[[ ! "$TERM" =~ tmux ]] && \
|
||||
command -v tmux &>/dev/null
|
||||
then
|
||||
if systemctl -q --user is-active tmux; then
|
||||
if tmux -N -L "$USER" server-info &>/dev/null; then
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
exec tmux -N -L "$USER" new-session
|
||||
else
|
||||
exec tmux -N -L "$USER" new-session -A
|
||||
fi
|
||||
else
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
exec tmux new-session
|
||||
else
|
||||
exec tmux new-session -A
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.config/bash/sourcer" ]; then
|
||||
|
||||
@ -7,11 +7,19 @@ if \
|
||||
[[ ! "$TERM" =~ tmux ]] && \
|
||||
command -v tmux &>/dev/null
|
||||
then
|
||||
if systemctl -q --user is-active tmux; then
|
||||
if tmux -N -L "$USER" server-info &>/dev/null; then
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
exec tmux -N -L "$USER" new-session
|
||||
else
|
||||
exec tmux -N -L "$USER" new-session -A
|
||||
fi
|
||||
else
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
exec tmux new-session
|
||||
else
|
||||
exec tmux new-session -A
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$ZDOTDIR/sourcer" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user