1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-14 19:03:09 +00:00

Move environment variables to their own file

This commit is contained in:
Thomas A. Christensen II 2021-08-24 20:36:50 -05:00
parent 9665a3f087
commit 9b51c6a61a
3 changed files with 49 additions and 33 deletions

46
dot_envvar Normal file
View file

@ -0,0 +1,46 @@
# Enable pipx completions
if [ $(command -v pipx) ]; then
eval "$(register-python-argcomplete pipx)"
fi
# Preferred editor for local and remote sessions
if [ $(command -v nano) ]; then
export EDITOR=nano
elif [ $(command -v emacs) ]; then
export EDITOR='emacs -nw'
elif [ $(command -v vim) ]; then
export EDITOR=vim
fi
if [ $(command -v kate) ]; then
export VISUAL=kate
elif [ $(command -v code) ]; then
export VISUAL=code
elif [ $(command -v emacs) ]; then
export VISUAL=emacs
fi
# Set a cool new pager with color support
if [[ $(command -v most) ]]; then
export PAGER=most
fi
# Replace cat with bat
if [[ $(command -v bat) ]]; then
export BAT_PAGER="less -RF"
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"
fi
# Add notification support for long-running processes
if [[ $(command -v ntfy) ]]; then
eval "$(ntfy shell-integration --longer-than 30)"
export AUTO_NTFY_DONE_IGNORE="vim nano emacs kate zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man"
fi
# Set the Nextflow enviroment caches
export NXF_HOME="$HOME/.nextflow"
export NXF_CONDA_CACHEDIR="$NXF_HOME/conda"
export NXF_SINGULARITY_CACHEDIR="$NXF_HOME/singularity"
export NXF_CHARLIECLOUD_CACHEDIR="$NXF_HOME/charlie"

View file

@ -31,5 +31,7 @@ conda config --set changeps1 true
eval "$(direnv hook bash)" eval "$(direnv hook bash)"
# <<< direnv initalize <<< # <<< direnv initalize <<<
source $HOME/.envvar
# Make the prompt pretty, just in case we're stuck in bash land # Make the prompt pretty, just in case we're stuck in bash land
export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ " export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "

View file

@ -89,42 +89,10 @@ antigen apply
autoload -U bashcompinit autoload -U bashcompinit
bashcompinit bashcompinit
# Enable pipx completions source $HOME/.envvar
if [[ $(command -v pipx) ]]; then
eval "$(register-python-argcomplete pipx)"
fi
# Preferred editor for local and remote sessions
if [[ $(command -v nano) ]]; then
export EDITOR=nano
fi
# Set a cool new pager with color support
if [[ $(command -v most) ]]; then
export PAGER=most
fi
alias zshconfig="$EDITOR ~/.zshrc" alias zshconfig="$EDITOR ~/.zshrc"
source $HOME/.aliases source $HOME/.aliases
# Replace cat with bat
if [[ $(command -v bat) ]]; then
export BAT_PAGER="less -RF"
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"
fi
# Add notification support for long-running processes
if [[ $(command -v ntfy) ]]; then
eval "$(ntfy shell-integration --longer-than 30)"
export AUTO_NTFY_DONE_IGNORE="vim nano emacs zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man"
fi
# Set the Nextflow enviroment caches
export NXF_HOME="$HOME/.nextflow"
export NXF_CONDA_CACHEDIR="$NXF_HOME/conda"
export NXF_SINGULARITY_CACHEDIR="$NXF_HOME/singularity"
export NXF_CHARLIECLOUD_CACHEDIR="$NXF_HOME/charlie"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh