Reorganized zshrc to shared components

This commit is contained in:
Eric Renfro 2019-01-06 18:10:12 -05:00
parent 72d9a9eff3
commit 7793b84611
4 changed files with 38 additions and 48 deletions

View file

@ -0,0 +1,8 @@
# Default Environment
export EDITOR=vim
export VISUAL=vim
export PAGER=less
# Disable Ctrl+S Scroll-Locking
stty -ixon

View file

@ -0,0 +1,4 @@
# Fix the ESC+Backspace
bindkey -e "^[[1;5C" forward-word
bindkey -e "^[[1;5D" backward-word

View file

@ -0,0 +1,23 @@
if [[ -f /etc/solus-release ]]; then
export SSH_ASKPASS=/usr/lib64/seahorse/seahorse/ssh-askpass
if [[ $TILIX_ID || $VTE_VERSION ]]; then
source /usr/share/defaults/etc/profile.d/vte.sh
precmd_functions+=(__vte_osc7)
fi
elif [[ -f /etc/debian_version ]]; then
if [[ $TILIX_ID || $VTE_VERSION ]]; then
if [[ -r "/etc/profile.d/vte-2.91.sh" ]]; then
source /etc/profile.d/vte-2.91.sh
precmd_functions+=(__vte_osc7)
fi
fi
elif [[ -f /etc/fedora-release ]]; then
if [[ $TILIX_ID || $VTE_VERSION ]]; then
if [[ -r "/etc/profile.d/vte.sh" ]]; then
source /etc/profile.d/vte.sh
precmd_functions+=(__vte_osc7)
fi
fi
fi

51
.zshrc
View file

@ -1,12 +1,3 @@
#if [[ -f /etc/solus-release ]]; then
# if [[ $TILIX_ID || $VTE_VERSION ]]; then
# echo "Loading VTE extensions..."
# source /usr/share/defaults/etc/profile.d/vte.sh
# fi
#fi
#precmd_functions+=(__vte_osc7)
#
# User configuration sourced by interactive shells
#
@ -21,42 +12,9 @@ export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
# Fix the ESC+Backspace
bindkey -e
bindkey -e "^[[1;5C" forward-word
bindkey -e "^[[1;5D" backward-word
# Default Environment
export EDITOR=vim
export VISUAL=vim
export PAGER=less
#function custom_prompt() {
# VTE_PWD_THING="$(__vte_osc7)"
# PS1="$PS1$VTE_PWD_THING"
#}
if [[ -f /etc/solus-release ]]; then
export SSH_ASKPASS=/usr/lib64/seahorse/seahorse/ssh-askpass
if [[ $TILIX_ID || $VTE_VERSION ]]; then
source /usr/share/defaults/etc/profile.d/vte.sh
precmd_functions+=(__vte_osc7)
fi
elif [[ -f /etc/debian_version ]]; then
if [[ $TILIX_ID || $VTE_VERSION ]]; then
if [[ -r "/etc/profile.d/vte-2.91.sh" ]]; then
source /etc/profile.d/vte-2.91.sh
precmd_functions+=(__vte_osc7)
fi
fi
elif [[ -f /etc/fedora-release ]]; then
if [[ $TILIX_ID || $VTE_VERSION ]]; then
if [[ -r "/etc/profile.d/vte.sh" ]]; then
source /etc/profile.d/vte.sh
precmd_functions+=(__vte_osc7)
fi
fi
fi
#bindkey -e
#bindkey -e "^[[1;5C" forward-word
#bindkey -e "^[[1;5D" backward-word
# Set GPG TTY
#export GPG_TTY=$(tty)
@ -70,9 +28,6 @@ fi
# export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
#fi
# Disable Ctrl+S Scroll-Locking
stty -ixon
# Include local functions/aliases/environments:
while read f
do