Move shared env between zsh and bash to file

master
Ian Mancini 5 years ago
parent 65bef1524d
commit e07d16e626

@ -1,6 +1,12 @@
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
# load Aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"
# Load environment
[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc"
# Enable bash_completion # Enable bash_completion
if [ -f /usr/share/bash-completion/bash_completion ]; then if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion . /usr/share/bash-completion/bash_completion
@ -9,66 +15,6 @@ fi
# Enable vi mode # Enable vi mode
set -o vi set -o vi
# Enable colors
eval "`dircolors -b`"
# env
EDITOR="nvim"
TERMINAL="urxvt"
# FZF
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Keychain
if [ -z ${DISPLAY+x} ]; then
eval "$(keychain --eval --quiet --noask --agents gpg,ssh id_rsa)"
else
eval "$(keychain --eval --quiet --agents gpg,ssh id_rsa)"
fi
# load Aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"
# Add some colour to LESS/MAN pages
export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s"
export LESS='-R'
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;33m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;42;30m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
# The Fuck
#eval $(thefuck --alias)
# nnn
n()
{
nnn "$@"
NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE
rm -f $NNN_TMPFILE > /dev/null
fi
}
# NVM
#export NODE_OPTIONS="--max-old-space-size=1024"
#export NVM_DIR="$HOME/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nv
# fnm
export PATH=/home/ianmethyst/.fnm:$PATH
eval "`fnm env --multi`"
# Sensible Bash - An attempt at saner Bash defaults # Sensible Bash - An attempt at saner Bash defaults
# Maintainer: mrzool <http://mrzool.cc> # Maintainer: mrzool <http://mrzool.cc>

@ -10,7 +10,9 @@ alias \
mv="mv -iv" \ mv="mv -iv" \
rm="rm -v" \ rm="rm -v" \
mkdir="mkdir -pv" \ mkdir="mkdir -pv" \
dmesg="dmesg --ctime" dmesg="dmesg --ctime" \
sudo='sudo ' # https://wiki.archlinux.org/index.php/Sudo#Passing_aliases
# Color # Color
alias \ alias \

@ -0,0 +1,39 @@
#!/bin/sh
# env
EDITOR="nvim"
TERMINAL="alacritty"
BROWSER="chromium"
# bin
export PATH=/home/ianmethyst/.local/bin:$PATH
# Enable colors
eval "`dircolors -b`"
# Add some colour to LESS/MAN pages
export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s"
export LESS='-R'
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;33m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;42;30m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
# fzf
export FZF_DEFAULT_COMMAND='ag --hidden -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Keychain
if [ -z ${DISPLAY+x} ]; then
eval "$(keychain --eval --quiet --noask --agents gpg,ssh id_rsa)"
else
eval "$(keychain --eval --quiet --agents gpg,ssh id_rsa)"
fi
# fnm
export PATH=/home/ianmethyst/.fnm:$PATH
eval "`fnm env --multi`"

@ -1,6 +1,7 @@
[[ -f ~/.Xdefaults ]] && xrdb -merge -I $HOME ~/.Xdefaults [[ -f ~/.Xdefaults ]] && xrdb -merge -I $HOME ~/.Xdefaults
export TERMINAL=alacritty export EDITOR="nvim"
export EDITOR=nvim export BROWSER="chromium"
export TERMINAL="alacritty"
exec i3 exec i3

@ -9,7 +9,6 @@ set pages-per-row 1
# Stop at page boundries # Stop at page boundries
set scroll-page-aware "true" set scroll-page-aware "true"
set smooth-scroll "true"
set scroll-full-overlap 0.01 set scroll-full-overlap 0.01
# Zoom settings # Zoom settings

@ -4,6 +4,9 @@
# Load aliases # Load aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc" [ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"
# Load environment
[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc"
######### #########
# zplug # # zplug #
######### #########
@ -87,10 +90,6 @@ setopt AUTO_CONTINUE
# Dont write over existing files with >, use >! instead # Dont write over existing files with >, use >! instead
setopt NOCLOBBER setopt NOCLOBBER
# ls Colors
LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:';
export LS_COLORS
# Completion # Completion
zmodload zsh/complist zmodload zsh/complist
autoload -Uz compinit autoload -Uz compinit
@ -122,36 +121,3 @@ zstyle ':completion:*' cache-path ~/.zsh/cache
# bindkey "^[[B" history-beginning-search-forward # bindkey "^[[B" history-beginning-search-forward
bindkey '^[[A' history-substring-search-up bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down bindkey '^[[B' history-substring-search-down
###############
# Environment #
###############
# bin
export PATH=/home/ianmethyst/.local/bin:$PATH
# fzf
export FZF_DEFAULT_COMMAND='ag --hidden -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Keychain
if [ -z ${DISPLAY+x} ]; then
eval "$(keychain --eval --quiet --noask --agents gpg,ssh id_rsa)"
else
eval "$(keychain --eval --quiet --agents gpg,ssh id_rsa)"
fi
# fnm
export PATH=/home/ianmethyst/.fnm:$PATH
eval "`fnm env --multi`"
# NVM
#export NODE_OPTIONS="--max-old-space-size=1024"
#export NVM_DIR="$HOME/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Base 16
#BASE16_SHELL_SET_BACKGROUND=false
#BASE16_SHELL=$HOME/.config/base16-shell/
#[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"

Loading…
Cancel
Save