profile/profile
2026-10-27 12:01:57 +00:00

51 lines
1.2 KiB
Bash

#!/bin/sh
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"
export SHELL_CONFIG="${SHELL_CONFIG:+${SHELL_CONFIG}:}.profile"
export EDITOR=/usr/bin/vim
export BROWSER=/usr/bin/qutebrowser
export GOPATH="$HOME/.go"
_path_prepend() {
case ":${PATH}:" in
*":$1:"*) ;;
*) PATH="$1${PATH:+:${PATH}}" ;;
esac
}
_path_append() {
case ":${PATH}:" in
*":$1:"*) ;;
*) PATH="${PATH:+${PATH}:}$1" ;;
esac
}
if command -v ruby >/dev/null 2>&1; then
ruby_path=$(ruby -r rubygems -e 'puts Gem.user_dir' 2>/dev/null)
[ -n "$ruby_path" ] && _path_prepend "$ruby_path/bin"
fi
if command -v composer >/dev/null 2>&1; then
phpcs_path=$(composer global config bin-dir --absolute 2>/dev/null)
[ -n "$phpcs_path" ] && _path_prepend "$phpcs_path"
fi
_path_append "$GOPATH/bin"
_path_append "$HOME/.local/bin"
_path_append /opt/neovim/nvim-linux-x86_64/bin
export PATH
# https://developers.google.com/web/tools/puppeteer/troubleshooting
export CHROME_DEVEL_SANDBOX=/usr/lib/chromium/chrome-sandbox
[ -r "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
unset ruby_path phpcs_path
unset -f _path_prepend _path_append 2>/dev/null || true
# vim: filetype=sh