123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- # vim: ft=sh:
- # shellcheck shell=sh
- # shellcheck disable=3043,1090
- __prependpath() {
- local __p
- for __p; do
- case ":${PATH}:" in
- *:"${__p}":*) continue ;;
- esac
- PATH="${__p}${PATH:+:${PATH}}"
- done
- export PATH
- }
- __appendpath() {
- local __p
- for __p; do
- case ":${PATH}:" in
- *:"${__p}":*) continue ;;
- esac
- PATH="${PATH:+${PATH}:}${__p}"
- done
- export PATH
- }
- __prependpath "${HOME}/.local/bin/override/nixGL"
- __appendpath "${HOME}/.local/bin"
- __appendpath "${HOME}/.local/bin/chromium-apps"
- umask 0027
- export USE_EMOJI=no
- # def #
- export EDITOR=vim
- export PAGER=less
- export TERMINAL=st
- export TMPDIR="${TMPDIR:-/tmp}"
- # XDG #
- ### xdg-user-dir(1) ###
- export XDG_DESKTOP_DIR="${TMPDIR}"
- export XDG_DOWNLOAD_DIR="${HOME}/Downloads"
- export XDG_DOCUMENTS_DIR="${HOME}/Documents"
- export XDG_MUSIC_DIR="${XDG_DOCUMENTS_DIR}/music"
- export XDG_CACHE_HOME="${HOME}/.cache"
- export XDG_CONFIG_HOME="${HOME}/.config"
- export XDG_DATA_HOME="${HOME}/.local/share"
- : "${XDG_RUNTIME_DIR:=${TMPDIR}/runtime-${USER:-$(id -un)}}"
- export XDG_RUNTIME_DIR
- # gtk #
- export GTK_THEME=Adwaita:dark
- # ~/ clean-up #
- export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
- export GNUPGHOME="${XDG_DATA_HOME}/gnupg"
- export GOPATH="${XDG_CACHE_HOME}/golang"
- export CARGO_HOME="${XDG_CACHE_HOME}/cargo"
- export PYLINTHOME="${XDG_CACHE_HOME}/pylint"
- export RUSTUP_HOME="${XDG_CACHE_HOME}/rustup"
- export IPYTHONDIR="${XDG_CACHE_HOME}/ipython"
- export RLWRAP_HOME="${XDG_CACHE_HOME}/rlwrap"
- export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
- export PYLINTRC="${XDG_CONFIG_HOME}/pylint/pylintrc"
- export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/password-store"
- export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/startup.py"
- export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent"
- ## tex ##
- export TEXMFHOME="${XDG_DATA_HOME}/texmf"
- export TEXMFVAR="${XDG_CACHE_HOME}/texlive/texmf-var"
- export TEXMFCONFIG="${XDG_CONFIG_HOME}/texlive/texmf-config"
- ## haskell ##
- export CABAL_DIR="${XDG_CACHE_HOME}/cabal"
- export CABAL_CONFIG="${XDG_CONFIG_HOME}/cabal/cabal.hs"
- # less #
- export LESS=-iRS
- export LESSHISTFILE=-
- __033="$(printf %b '\033')" && {
- export LESS_TERMCAP_mb="${__033}[1;31m"
- export LESS_TERMCAP_md="${__033}[1;36m"
- export LESS_TERMCAP_me="${__033}[0m"
- export LESS_TERMCAP_so="${__033}[01;44;33m"
- export LESS_TERMCAP_se="${__033}[0m"
- export LESS_TERMCAP_us="${__033}[1;32m"
- export LESS_TERMCAP_ue="${__033}[0m"
- }
- unset __033
- # tmux #
- export TMUX_TMPDIR="${TMPDIR}"
- # rust #
- export RUSTFLAGS='-C target-feature=-crt-static'
- __prependpath "${CARGO_HOME}/bin"
- __export_list() {
- local _i __eval
- # shellcheck disable=2016
- for _i; do
- [ -f "${XDG_CONFIG_HOME}/${_i}" ] || continue
- __eval='sed -z "s/\n\s*\n/\n/g;s/\n/:/g"'
- __eval="${_i}="'$('"${__eval}"' < "${XDG_CONFIG_HOME}/${_i}")'
- __eval="${__eval} && export ${_i}"
- eval "${__eval}"
- done
- }
- __export_list LF_ICONS LS_COLORS EXA_COLORS
- unset -f __export_list
- # pfetch #
- export PF_INFO='ascii title os kernel uptime wm shell editor palette'
- # skim #
- export SKIM_DEFAULT_OPTIONS='--color fg:#d0d0d0,hl:#5f87af,fg+:#d0d0d0,'\
- 'hl+:#5fd7ff,info:#435961,prompt:#EFA6A2,pointer:#af5fff,marker:#80C990,'\
- 'spinner:#af5fff,header:#b4d8d8'
- [ -r ~/.config/private-env ] && . ~/.config/private-env
- __prependpath "${HOME}/.local/bin/override"
- unset -f __appendpath
- unset -f __prependpath
|