diff --git a/zsh/.zshrc b/zsh/.zshrc index 405f719..7e47fb4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,18 +1,11 @@ -if [[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" -fi - +if [[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh"; fi source $ZDOTDIR/exports.zsh source $ZDOTDIR/dircolor.zsh source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh -if [[ $os == "arch" ]]; then - source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme -else - source $HOME/.config/p10k/powerlevel10k.zsh-theme -fi +if [[ $os == "arch" ]]; then source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme; else source $HOME/.config/p10k/powerlevel10k.zsh-theme; fi autoload -Uz compinit bashcompinit compinit -d $HOME/.cache/zsh/compdump @@ -21,9 +14,7 @@ bashcompinit for file in $ZDOTDIR/libs/*.zsh; do source "$file"; done for file in $ZDOTDIR/plgs/*.zsh; do source "$file"; done -source $ZDOTDIR/tmux/tmux.zsh - -[[ ! -f $ZDOTDIR/.p10k.zsh ]] || source $ZDOTDIR/.p10k.zsh +[[ -f $ZDOTDIR/.p10k.zsh ]] && source $ZDOTDIR/.p10k.zsh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/zsh/tmux/tmux.zsh b/zsh/libs/tmux.zsh similarity index 91% rename from zsh/tmux/tmux.zsh rename to zsh/libs/tmux.zsh index 272ba89..fefd221 100644 --- a/zsh/tmux/tmux.zsh +++ b/zsh/libs/tmux.zsh @@ -24,8 +24,6 @@ alias tkss='tmux kill-session -t' : ${ZSH_TMUX_AUTOQUIT:=$ZSH_TMUX_AUTOSTART} # Set term to screen or screen-256color based on current terminal support : ${ZSH_TMUX_FIXTERM:=true} -# Set '-CC' option for iTerm2 tmux integration -: ${ZSH_TMUX_ITERM2:=false} # The TERM to use for non-256 color terminals. # Tmux states this should be screen, but you may need to change it on # systems without the proper terminfo @@ -47,11 +45,9 @@ else fi # Set the correct local config file to use. -if [[ "$ZSH_TMUX_ITERM2" == "false" && -e "$ZSH_TMUX_CONFIG" ]]; then +if [[ -e "$ZSH_TMUX_CONFIG" ]]; then export ZSH_TMUX_CONFIG - export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.extra.conf" -else - export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux.only.conf" + export _ZSH_TMUX_FIXED_CONFIG="${0:h:a}/tmux/tmux.conf" fi # Wrapper function for tmux. diff --git a/zsh/tmux/tmux-extra.conf b/zsh/libs/tmux/tmux.conf similarity index 100% rename from zsh/tmux/tmux-extra.conf rename to zsh/libs/tmux/tmux.conf diff --git a/zsh/tmux/tmux.conf b/zsh/tmux/tmux.conf deleted file mode 100644 index 0734df3..0000000 --- a/zsh/tmux/tmux.conf +++ /dev/null @@ -1 +0,0 @@ -set -g default-terminal $ZSH_TMUX_TERM