1
0
Files
chezmoi/home/dot_zshenv
2025-11-14 10:57:14 +01:00

77 lines
2.6 KiB
Plaintext

# Start configuration added by Zim install {{{
#
# User configuration sourced by all invocations of the shell
#
# Define Zim location
: ${ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim}
# }}} End configuration added by Zim install
# Start personal configuration directives {{{
# >>> define PATH variable as an array
typeset -U path
# <<< define PATH variable as an array
# >>> set PATH so it includes user's private bin if it exists >>>
path=(~/bin ~/.local/bin $path[@])
# <<< set PATH so it includes user's private bin if it exists <<<
# >>> environment variables >>>
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export XDG_CONFIG_HOME="${HOME}/.config"
# Update path
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:${PATH}"
export GEM_HOME="$(${HOME}/.asdf/shims/gem env user_gemhome)"
export PATH="${GEM_HOME}/bin:${PATH}"
export PATH="$(go env GOBIN):$(go env GOPATH)/bin:${PATH}"
[[ -d ${HOME}/.fuelup ]] && export PATH="${HOME}/.fuelup/bin:${PATH}"
[[ $(command -v rofi) ]] && export PATH="${HOME}/.config/rofi/scripts:${PATH}"
# Set default browser, editor, terminal and shell
export BROWSER=qutebrowser
export EDITOR=$(( [[ $(command -v nvim) ]] && echo nvim ) || ( [[ $(command -v vim) ]] && echo vim ) || echo nano)
export TERMINAL=$(( [[ $(command -v kitty) ]] && echo kitty ) || ( [[ $(command -v alacritty) ]] && echo alacritty ) || echo xterm)
export SHELL=/usr/bin/zsh
# to permit fcitx runs with kitty
export GLFW_IM_MODULE=ibus
# Set fuzzy finder command to rg if installed
[[ $(command -v rg) ]] && export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export PASSWORD_STORE_DIR="${HOME}/.password-store"
export PASSWORD_STORE_ENABLE_EXTENSIONS=True
export ZK_NOTEBOOK_DIR="${HOME}/Notes"
export OPENAI_API_KEY="$(pass _api_keys/openai_perso-2 2>/dev/null || echo ERROR)"
export IPINFO_API_KEY="$(pass _api_keys/ipinfo_perso-0 2>/dev/null || echo ERROR)"
# Set electron trash implementation if trash-cli installed
[[ ( $(command -v code) && $(command -v trash) ) ]] && export ELECTRON_TRASH="trash"
# Disable hardware cursors. This might fix issues with
# disappearing cursors
if systemd-detect-virt -q; then
# if the system is running inside a virtual machine, disable hardware cursors
export WLR_NO_HARDWARE_CURSORS=1
fi
# Disable warnings by OpenCV
export OPENCV_LOG_LEVEL=ERROR
# <<< environment variables <<<
# Load profile
set -a
. "${HOME}/.config/user-dirs.dirs"
set +a
if [ -n "$(ls "${HOME}"/.config/profile.d 2>/dev/null)" ]; then
for f in "${HOME}"/.config/profile.d/*; do
# shellcheck source=/dev/null
. "$f"
done
fi
# }}} End personnal configuration directives