dotfiles/profile

45 lines
1.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 GTK_THEME="Nordic"
export GIT_EDITOR="nvim"
export GPG_TTY=$(tty)
export PATH="$HOME/.local/bin:$PATH"
# Let's set up our personal routes
hostname=$(hostname)
if [ "$hostname" = apsalar ]; then
dir="/mnt/storage/screenshots"
elif [ "$hostname" = hetan ]; then
dir="$HOME/Screenshots"
fi
export SCREENSHOT_DIR="$dir"
# Let's get some private environment vars
source $HOME/.profile.private
# Let's keep $HOME clean
LESSHISTFILE=-
# Launch sway!
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
dbus-run-session sway
fi
alias ccat="highlight -O ansi $@"
alias ls="ls -h --color=auto"
alias myip6="curl https://ifconfig.co"
alias myip4="curl -4 https://ifconfig.co"
alias vim="nvim $@"
alias wget="wget --hsts-file $HOME/.cache/wget/hsts"
alias woodpecker="$HOME/.local/bin/woodpecker --log-level=''"