Auto ru tmux after run zshell

This commit is contained in:
Anas Elgarhy 2022-03-20 19:31:44 +02:00
parent 92b4dbda10
commit 1e1026c039

14
.zshrc
View file

@ -1,7 +1,13 @@
### EXPORT ###
export EDITOR='nvim'
export VISUAL='nvim'
export TERMINAL='alacritty'
USE_POWERLINE="true"
setopt correct # Auto corect mistakes
setopt nobeep # No beep
# Enable colors and change prompt:
autoload -U colors && colors
# PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
@ -106,9 +112,15 @@ bindkey "$terminfo[kcud1]" history-substring-search-down
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# Auto open tmux session
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
# Aliases
alias jshell=/usr/lib/jvm/java-17-openjdk/bin/jshell
alias clear='clear && ufetch'
alias cls='/usr/bin/clear'
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"