upd zprofile for tmux

This commit is contained in:
thek4n 2024-02-16 14:16:02 +03:00
parent d8e6a6ac08
commit 433ae456ae
2 changed files with 5 additions and 6 deletions

View File

@ -44,7 +44,7 @@ map('n', '<bs>', '"_X')
-- Put without overwrite yanked text
map('x', 'p', 'P')
map({'n', 'v'}, 'p', 'P')
-- Increment/decrement

View File

@ -3,14 +3,13 @@ if [[ "$TTY" =~ /dev/tty* ]]; then
setfont cyr-sun16
fi
if systemctl -q is-active graphical.target && [[ $(tty) = "/dev/tty1" ]] && [[ -z $DISPLAY ]] && [[ $XDG_VTNR -eq 1 ]]; then
if [[ "$TTY" = "/dev/tty1" ]] && [[ $XDG_VTNR -eq 1 ]] && [[ -z $DISPLAY ]] && systemctl -q is-active graphical.target; then
exec startx >> ~/.xlogs 2>&1
elif command -v tmux &>/dev/null && [[ $(tty) = "/dev/tty2" ]] && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then
exec tmux new-session
elif [[ "$TTY" = "/dev/tty2" ]] && command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then
exec tmux new-session -s "$(basename $TTY)" -A
fi
if [[ -n "$SSH_CLIENT" ]] && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then
export SSH_CLIENT # for prompt
export SSH_CLIENT
exec tmux new-session -s ssh -A
fi