1
0
Fork 0
dotfiles/.config/shell/profile

57 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-02-07 14:24:06 +01:00
#!/bin/sh
2022-07-04 21:36:33 +02:00
# profile file. Runs on login. Environmental variables are set here.
# Adds `~/.local/bin` to $PATH
2023-02-07 14:24:06 +01:00
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
export PATH="$PATH:~/.local/share/npm-global/bin:$localpath"
2022-07-04 21:36:33 +02:00
# Default programs:
2022-10-04 19:03:01 +02:00
export EDITOR="nvim"
2022-07-06 13:21:33 +02:00
export TERMINAL="kitty"
2022-07-04 23:30:22 +02:00
export BROWSER="librewolf"
2022-07-04 21:36:33 +02:00
2022-08-05 22:33:31 +02:00
# Clean-up:
2022-07-04 21:36:33 +02:00
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
2023-02-09 14:50:48 +01:00
export PYENVS_DIR="$XDG_DATA_HOME/virtualenv"
2022-08-22 20:33:37 +02:00
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
2023-02-09 14:50:48 +01:00
export ZSH_COMPDUMP="$XDG_CACHE_HOME/zcompdump"
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/.config}/gtk-2.0/gtkrc-2.0"
2022-07-04 21:36:33 +02:00
export LESSHISTFILE="-"
2023-02-09 14:50:48 +01:00
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
2022-07-04 21:36:33 +02:00
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
2023-02-09 14:50:48 +01:00
export ANDROID_HOME="$XDG_DATA_HOME/android"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export GOPATH="$XDG_DATA_HOME/go"
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible/ansible.cfg"
export ANSIBLE_HOME="$XDG_DATA_HOME/ansible"
export UNISON="$XDG_DATA_HOME/unison"
export HISTFILE="$XDG_DATA_HOME/history"
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
2023-02-07 14:24:06 +01:00
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # WARN: This line can break some display managers
2023-02-09 14:50:48 +01:00
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
2023-02-14 14:51:03 +01:00
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
_JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
2023-02-06 14:17:33 +01:00
2022-07-04 21:36:33 +02:00
# Other program settings:
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
2022-08-22 20:33:37 +02:00
2023-02-09 13:13:39 +01:00
[ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startgraphical