# vim: filetype=zsh if [[ ! -d "${HISTFILE:h}" ]]; then mkdir -p "${HISTFILE:h}" fi add_path() { if [[ -d "$1" ]]; then path=("$1" $path) fi } set_include_lib_path() { local prefix="$1" # Fix für include/lib Verzeichnisse # Details: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html export C_INCLUDE_PATH="$prefix/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH}" export CPLUS_INCLUDE_PATH="$prefix/include${CPLUS_INCLUDE_PATH:+:$CPLUS_INCLUDE_PATH}" export LIBRARY_PATH="$prefix/lib${LIBRARY_PATH:+:$LIBRARY_PATH}" } set_mac_environment() { add_path "/opt/homebrew/bin" set_include_lib_path "/opt/homebrew" } set_freebsd_environment() { local texlive_prefix="$HOME/.local/texlive" if [[ -d "$texlive_prefix/bin/amd64-freebsd" ]]; then add_path "$texlive_prefix/bin/amd64-freebsd" export MANPATH="${MANPATH:-$(manpath)}:$texlive_prefix/texmf-dist/man" export INFOPATH="${INFOPATH:+$INFOPATH:}$texlive_prefix/texmf-dist/info" fi set_include_lib_path "/usr/local" # mpd starten if [[ -x /usr/local/bin/musicpd ]] && ! pgrep "musicpd" > /dev/null; then /usr/local/bin/musicpd fi } add_path "$HOME/.cargo/bin" add_path "$HOME/.local/bin" case "$OSTYPE" in darwin*) set_mac_environment ;; freebsd*) set_freebsd_environment ;; esac # Fix Midnight Commander ESC Taste # zusätzlich noch unter "F9 -> Optionen -> Konfiguration -> Escape Tastenmodus -> [x] Einzelner Tastendruck" aktivieren export KEYBOARD_KEY_TIMEOUT_US=1000 # Tmuxp # https://tmuxp.git-pull.com/configuration/environmental-variables.html export TMUXP_CONFIGDIR="$XDG_CONFIG_HOME/tmuxp" # Vit (Taskwarrior UI) # https://github.com/vit-project/vit/blob/2.x/CUSTOMIZE.md export VIT_DIR="$XDG_CONFIG_HOME/vit" # Maildir für mu (mail-utils) export MAILDIR="$HOME/Mail" unfunction add_path unfunction set_include_lib_path unfunction set_mac_environment unfunction set_freebsd_environment