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

55 lines
2.4 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"
2022-08-05 22:33:31 +02:00
export PYENVS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/virtualenv"
2022-08-22 20:33:37 +02:00
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
2022-08-05 22:33:31 +02:00
export ZSH_COMPDUMP="${XDG_CACHE_HOME:-$HOME/.cache}/zcompdump"
2022-07-04 21:36:33 +02:00
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
2022-10-21 17:52:11 +02:00
export GRADLE_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/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-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-07 14:42:14 +01:00
[ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && shortcuts >/dev/null 2>&1 &
2023-02-09 13:13:39 +01:00
[ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startgraphical