2026-03-09 14:04:08 +03:00

27 lines
588 B
Bash

# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if \
[ "$(tty)" != "/dev/tty3" ] && \
command -v tmux &>/dev/null && \
[ -z "${TMUX}" ] && \
tmux -N -L "${USER}" list-sessions &>/dev/null
then
if [ -n "${SSH_CLIENT}" ]; then
exec tmux -N -L "${USER}" new-session
fi
exec tmux -N -L "${USER}" new-session -A
fi
if [ -f "${ZDOTDIR}/sourcer" ]; then
source "${ZDOTDIR}/sourcer"
fi
if \
command -v tmux &>/dev/null && \
[ -n "${TMUX}" ] && \
[ -n "${SSH_CLIENT}" ]
then
tmux source-file "${XDG_CONFIG_HOME}/tmux/remote.conf"
fi