From 40c63547de8828d20ed46397c4d19d7ae0fd5f5c Mon Sep 17 00:00:00 2001 From: Thek4n Date: Mon, 20 Nov 2023 16:01:38 +0300 Subject: [PATCH] remove tmux as main session, tty2 always in tmux --- home/user/.zprofile | 3 +++ home/user/.zshrc | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/home/user/.zprofile b/home/user/.zprofile index 79fee3a..8180d61 100644 --- a/home/user/.zprofile +++ b/home/user/.zprofile @@ -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 diff --git a/home/user/.zshrc b/home/user/.zshrc index 89d91af..a6f48a7 100644 --- a/home/user/.zshrc +++ b/home/user/.zshrc @@ -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