dotfiles/profile

38 lines
1 KiB
Bash

# Set XDG_RUNTIME_DIR for sway
if test -z "${XDG_RUNTIME_DIR}"; then
UID="$(id -u)"
export XDG_RUNTIME_DIR=/run/user/"${UID}"
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
# The city's finest exports!
export GIT_EDITOR="nvim"
export GPG_TTY=$(tty)
export PATH="$HOME/.local/bin:$PATH"
export SCREENSHOT_DIR="$HOME/Screenshots"
export LC_MESSAGES="C.UTF-8"
export TERM="xterm-256color"
export NPM_CONFIG_PREFIX="$HOME/.local/"
export PATH="$PATH:$NPM_CONFIG_PREFIX/bin"
# Let's get some private environment vars
source $HOME/.config/private.env
# Let's keep $HOME clean
export LESSHISTFILE=-
# Launch sway!
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
export XDG_CURRENT_DESKTOP=sway
dbus-run-session sway
fi
alias ccat="highlight -O ansi $@"
alias ls="eza --time-style '+%Y.%m.%d %H.%M' --colour always --icons --group-directories-first --git $@"
alias vim="nvim $@"
alias wget="wget --hsts-file $HOME/.cache/wget-hsts"