dotfiles/.bash_profile

143 lines
3.9 KiB
Bash
Raw Permalink Normal View History

2022-06-01 10:00:25 +02:00
# shellcheck shell=bash disable=SC1090
2022-03-16 09:52:53 +01:00
2019-05-28 17:44:30 +02:00
# Print date on login
2021-02-07 18:28:14 +01:00
printf '\e[1m\e[91m%(%A, %B %d, %Y)T \e[90m- \e[36m%(%Z %z)T\e[m\n\n'
2019-05-28 17:44:30 +02:00
2021-09-16 09:26:36 +02:00
# Set shell options
shopt -s dotglob globstar cmdhist
shopt -u force_fignore
2019-05-28 17:44:30 +02:00
2020-07-15 17:51:59 +02:00
# Set the default command & options used by fzf {{{
export FZF_DEFAULT_COMMAND='fd -LIH -tf --color=always'
export FZF_CTRL_T_COMMAND='fd -LIH -tf'
export FZF_ALT_C_COMMAND='fd -LIH -td'
export FZF_DEFAULT_OPTS='--ansi'
# }}}
2019-05-28 17:44:30 +02:00
2019-09-02 03:42:42 +02:00
# Set the default pager
2022-01-19 11:31:07 +01:00
export PAGER='nvimpager'
2019-05-28 17:44:30 +02:00
2019-09-02 03:42:42 +02:00
# Set the default editor
2022-01-19 11:31:07 +01:00
export EDITOR='nvim'
2019-05-28 17:44:30 +02:00
2019-09-02 03:42:42 +02:00
# Set the default browser
2022-01-19 11:31:07 +01:00
export BROWSER='firefox'
2019-05-28 17:44:30 +02:00
2019-09-25 20:07:56 +02:00
# Set the XDG directories {{{
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
2022-06-01 10:00:25 +02:00
export XDG_STATE_HOME="$HOME/.local/state"
2019-09-25 20:07:56 +02:00
export XDG_CACHE_HOME="$HOME/.cache"
# }}}
2020-01-20 08:03:32 +01:00
# Set the paths used by bash {{{
export BASH_COMPLETION_USER_DIR="$XDG_DATA_HOME/bash"
# }}}
2019-11-23 15:52:40 +01:00
# Set the paths used by python {{{
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/__pycache__"
2019-11-24 15:50:07 +01:00
export PYTHONSTARTUP="$XDG_CONFIG_HOME/pythonrc.py"
export PYTHON_EGG_CACHE="$XDG_CACHE_HOME/python-eggs"
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter"
2022-01-19 11:31:07 +01:00
export IPYTHONDIR="$XDG_CONFIG_HOME/jupyter"
2022-06-01 10:00:25 +02:00
export PYLINTHOME="$XDG_STATE_HOME/pylint"
2019-11-23 15:52:40 +01:00
# }}}
# Set the paths used by go {{{
2022-10-29 00:27:38 +02:00
export GOPATH="$XDG_DATA_HOME/go"
# }}}
2019-05-28 17:44:30 +02:00
2021-02-07 18:28:14 +01:00
# Set the paths used by R {{{
2022-10-29 00:27:38 +02:00
export R_LIBS_USER="$XDG_DATA_HOME/R"
2021-02-07 18:28:14 +01:00
export R_PROFILE="$XDG_CONFIG_HOME/Rprofile"
2022-09-05 09:53:48 +02:00
export R_HISTFILE="$XDG_STATE_HOME/R/history"
2021-02-07 18:28:14 +01:00
# }}}
# Set the paths used by perl5 {{{
2022-10-29 00:27:38 +02:00
export PERL5LIB="$XDG_DATA_HOME/perl/lib/perl5"
export PERL_CPANM_OPT="-l $XDG_DATA_HOME/perl"
export PERL_CPANM_HOME="$XDG_DATA_HOME/perl/cpanm"
2023-11-15 18:27:45 +01:00
export PERL_LOCAL_LIB_ROOT="$HOME/.local/share/perl"
2019-07-02 09:25:12 +02:00
# }}}
2019-09-25 20:07:56 +02:00
# Set the paths used by rust {{{
2021-02-07 18:28:14 +01:00
export CARGO_HOME="$XDG_CACHE_HOME/cargo"
2022-06-01 10:00:25 +02:00
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
2019-09-25 20:07:56 +02:00
# }}}
# Set the paths used by node {{{
2022-09-05 09:53:48 +02:00
export NODE_REPL_HISTORY="$XDG_STATE_HOME/node/history"
2019-09-25 20:07:56 +02:00
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# }}}
2019-11-24 15:50:07 +01:00
# Set the paths used by android {{{
2020-04-25 21:12:40 +02:00
export ANDROID_HOME="$HOME/.local/android"
2022-09-05 09:53:48 +02:00
export ANDROID_USER_HOME="$ANDROID_HOME"
2020-07-15 17:51:59 +02:00
# }}}
# Set the paths used by kotlin {{{
2019-11-24 15:50:07 +01:00
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
2020-07-15 17:51:59 +02:00
export KONAN_DATA_DIR="$XDG_DATA_HOME/konan"
2019-11-24 15:50:07 +01:00
# }}}
# Set the paths used by xorg {{{
export XCOMPOSEFILE="$XDG_CONFIG_HOME/X11/XCompose"
export XCOMPOSECACHE="$XDG_CACHE_HOME/X11/XCompose"
# }}}
# Set the paths used by ccache {{{
export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.cfg"
export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
# }}}
# Set the paths used by gpg {{{
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
# }}}
2020-04-25 21:12:40 +02:00
# Set the paths used by docker {{{
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
2022-10-29 00:27:38 +02:00
# }}}
2020-04-25 21:12:40 +02:00
# Set the paths used by texlive {{{
export TEXMFCONFIG="$XDG_CONFIG_HOME/texmf"
export TEXMFHOME="$XDG_DATA_HOME/texmf"
export TEXMFVAR="$XDG_CACHE_HOME/texmf"
# }}}
# Set the paths used by jetbrains {{{
2020-03-23 12:23:14 +01:00
export IDEA_PROPERTIES="$XDG_CONFIG_HOME/intellij-idea/idea.properties"
export IDEA_VM_OPTIONS="$XDG_CONFIG_HOME/intellij-idea/idea.vmoptions"
2020-04-25 21:12:40 +02:00
export CLION_PROPERTIES="$XDG_CONFIG_HOME/clion/clion.properties"
export CLION_VM_OPTIONS="$XDG_CONFIG_HOME/clion/clion.vmoptions"
export PYCHARM_PROPERTIES="$XDG_CONFIG_HOME/pycharm/charm.properties"
export PYCHARM_VM_OPTIONS="$XDG_CONFIG_HOME/pycharm/charm.vmoptions"
2020-03-23 12:23:14 +01:00
# }}}
2019-09-02 03:42:42 +02:00
# Set the search path for commands {{{
export PATH="$HOME/.local/bin:\
2021-02-07 18:28:14 +01:00
/usr/local/bin:/usr/bin:\
2019-09-02 03:42:42 +02:00
/usr/lib/jvm/default/bin:\
/usr/bin/site_perl:\
/usr/bin/vendor_perl:\
/usr/bin/core_perl:\
2022-10-29 00:27:38 +02:00
$XDG_DATA_HOME/perl/bin:\
2022-01-19 11:31:07 +01:00
$GOPATH/bin"
2019-09-25 20:07:56 +02:00
# }}}
2019-11-24 15:50:07 +01:00
# Specify inputrc
test -f "$XDG_CONFIG_HOME/inputrc" && export INPUTRC="$_"
2021-02-07 18:28:14 +01:00
# Source fzf keybinds
2022-01-19 11:31:07 +01:00
test -f '/usr/share/fzf/key-bindings.bash' && . "$_"
2021-02-07 18:28:14 +01:00
2019-05-28 17:44:30 +02:00
# Source bashrc
2019-11-24 15:50:07 +01:00
test -f "$XDG_DATA_HOME/bash/bashrc.sh" && . "$_"
2019-05-28 17:44:30 +02:00
2020-07-15 17:51:59 +02:00
# Source aliases
test -f "$XDG_DATA_HOME/bash/aliases.sh" && . "$_"
# Source functions
test -f "$XDG_DATA_HOME/bash/functions.sh" && . "$_"
2022-01-19 11:31:07 +01:00
# vim:fdm=marker:fdl=1:ft=sh: