51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
# ~/.profile
|
|
|
|
# if running bash
|
|
if [ -n "$BASH_VERSION" ]; then
|
|
# include .bashrc if it exists
|
|
if [ -f "$HOME/.bashrc" ]; then
|
|
. "$HOME/.bashrc"
|
|
fi
|
|
fi
|
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
if [ -d "$HOME/bin" ]; then
|
|
PATH="$HOME/bin:$PATH"
|
|
fi
|
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
if [ -d "$HOME/.local/bin" ]; then
|
|
PATH="$HOME/.local/bin:$PATH"
|
|
fi
|
|
|
|
# xdg base directory specification
|
|
export XDG_CONFIG_HOME="$HOME"/.config
|
|
export XDG_CACHE_HOME="$HOME"/.cache
|
|
export XDG_DATA_HOME="$HOME"/.local/share
|
|
export XDG_STATE_HOME="$HOME"/.local/state
|
|
export XDG_DATA_DIRS=/usr/local/share:/usr/share
|
|
export XDG_CONFIG_DIRS=/etc/xdg
|
|
|
|
# .bash_history
|
|
export HISTFILE="$XDG_STATE_HOME"/bash/history
|
|
if [ ! -d "$(dirname "${HISTFILE}")" ]; then
|
|
mkdir -p "$(dirname "${HISTFILE}")"
|
|
fi
|
|
|
|
# editor
|
|
export EDITOR=vi
|
|
|
|
# desktop
|
|
if [ "$(tty)" = "/dev/tty1" ] && command -v sway >/dev/null; then
|
|
# locale
|
|
export LANG=sl_SI.UTF-8
|
|
export LC_MESSAGES=en_US.UTF-8
|
|
# defaults
|
|
export TERMINAL=footclient
|
|
export BROWSER=firefox
|
|
# run sway
|
|
export XDG_CURRENT_DESKTOP=sway
|
|
export WLR_RENDERER=vulkan
|
|
exec systemd-cat --identifier sway sway
|
|
fi
|