remove tmux as main session, tty2 always in tmux

This commit is contained in:
TheK4n 2023-11-20 16:01:38 +03:00
parent 678533c613
commit 40c63547de
2 changed files with 3 additions and 4 deletions

View File

@ -2,6 +2,9 @@ if [[ "$TTY" =~ /dev/tty* ]]; then
setterm -blength=0
fi
if systemctl -q is-active graphical.target && [[ $(tty) = "/dev/tty1" ]] && [[ -z $DISPLAY ]] && [[ $XDG_VTNR -eq 1 ]]; then
exec startx >> ~/.xlogs 2>&1
elif command -v tmux &>/dev/null && [[ $(tty) = "/dev/tty2" ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi

View File

@ -1,10 +1,6 @@
# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if command -v tmux &>/dev/null && [ -z "$TMUX" ] && [[ ! "$TERM" =~ tmux ]]; then
exec tmux new
fi
if [ -f $HOME/.config/zsh/sourcer ]; then
source $HOME/.config/zsh/sourcer
fi