1
0
Fork 0
dot/.profile

63 lines
1.6 KiB
Plaintext
Raw Normal View History

2024-01-27 21:15:47 +01:00
# ~/.profile
# if running bash
if [ -n "$BASH_VERSION" ]; then
2024-07-09 11:14:26 +02:00
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
2024-01-27 21:15:47 +01:00
fi
# set PATH so it includes user's private bin if it exists
2024-03-01 12:52:12 +01:00
if [ -d "$HOME/bin" ]; then
2024-01-27 21:15:47 +01:00
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ]; then
2024-07-09 11:14:26 +02:00
PATH="$HOME/.local/bin:$PATH"
2024-01-27 21:15:47 +01:00
fi
# xdg base directory specification
2024-07-07 22:14:04 +02:00
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
2024-01-27 21:15:47 +01:00
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export XDG_CONFIG_DIRS=/etc/xdg
# .bash_history
2024-07-07 22:14:04 +02:00
export HISTFILE="$XDG_STATE_HOME"/bash/history
2024-09-13 20:23:18 +02:00
[ ! -d "$(dirname "${HISTFILE}")" ] && mkdir -p "$(dirname "${HISTFILE}")"
[ -f "$HISTFILE" ] && sort -uo $HISTFILE $HISTFILE
2024-01-27 21:15:47 +01:00
# .inputrc
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
2024-07-17 03:11:53 +02:00
# .npm/, .npmrc
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
# .aspell.conf etc.
aspell_data_dir="$XDG_DATA_HOME"/aspell
if [ ! -d "$aspell_data_dir" ]; then
mkdir -p "$aspell_data_dir"
fi
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $aspell_data_dir/sl.pws; repl $aspell_data_dir/sl.prepl"
2024-01-27 21:15:47 +01:00
# editor
export EDITOR=vi
# desktop
2024-03-01 12:52:12 +01:00
if [ "$(tty)" = "/dev/tty1" ] && command -v sway >/dev/null; then
2024-09-13 20:24:05 +02:00
# 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 -t sway sway
2024-01-27 21:15:47 +01:00
fi