return autostart tmux session

This commit is contained in:
thek4n 2024-03-30 21:54:52 +03:00
parent cb5db2d90b
commit 793a649485
4 changed files with 7 additions and 3 deletions

View File

@ -2,10 +2,10 @@
# .bashrc by TheK4n
# https://github.com/TheK4n/dotfiles
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ] && [[ -z "$SSH_CLIENT" ]]; then
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ]; then
exec tmux
fi
if [ -f "$HOME/.config/bash/sourcer" ]; then
source $HOME/.config/bash/sourcer
source "$HOME/.config/bash/sourcer"
fi

View File

@ -0,0 +1,2 @@
# Tmux remote config

View File

@ -5,4 +5,6 @@ source-file "$HOME/.config/tmux/options.conf"
source-file "$HOME/.config/tmux/style.conf"
source-file "$HOME/.config/tmux/plugins.conf"
if-shell 'test -n "$SSH_CLIENT"' 'source-file "$HOME/.config/tmux/remote.conf"'
run -b "$HOME/.config/tmux/plugins/tpm/tpm"

View File

@ -1,7 +1,7 @@
# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ] && [[ -z "$SSH_CLIENT" ]]; then
if command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ "$(tty)" != "/dev/tty3" ]; then
exec tmux
fi