.profile (1995B)
1 #!/bin/sh 2 # Environmental variables are set here. (Runs on login) 3 4 # Add `~/.local/bin/*` to $PATH 5 [ -d "$HOME/.local/bin" ] && \ 6 export PATH=$PATH:$(find "$HOME/.local/bin" -type d | \ 7 sed ':a;N;$!ba;s/\n/:/g') 8 9 # Default Programs 10 export BROWSER="surf-open" 11 export EDITOR="vis" 12 export TERMINAL="st" 13 14 # XDG_BASE_DIRS 15 export XDG_CACHE_HOME=$HOME/.cache 16 export XDG_CONFIG_HOME=$HOME/.config 17 export XDG_DATA_HOME=$HOME/.local/share 18 export XDG_STATE_HOME=$HOME/.local/state 19 export XDG_RUNTIME_DIR=$HOME/.local/run 20 21 # Create XDG_BASE_DIRS, if not exists 22 [ -d "$XDG_DATA_HOME" ] || mkdir -p "$XDG_DATA_HOME" 23 [ -d "$XDG_STATE_HOME" ] || mkdir -p "$XDG_STATE_HOME" 24 [ -d "$XDG_CACHE_HOME" ] || mkdir -p "$XDG_CACHE_HOME" 25 [ -d "$XDG_RUNTIME_DIR" ] || mkdir -p "$XDG_RUNTIME_DIR" 26 [ -d "$XDG_CONFIG_HOME" ] || mkdir -p "$XDG_CONFIG_HOME" 27 28 # Store shell's name to $SH 29 SH=${0:-$SHELL} 30 SH=${SH##*/} 31 SH=${SH#-} 32 33 # Use $XDG_CONFIG_HOME for disrespectful programs 34 export GNUPGHOME=${XDG_DATA_HOME:-$HOME/.local/share}/gnupg 35 export GTK2_RC_FILES=${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0 36 export HISTFILE=${XDG_DATA_HOME:-$HOME/.local/share}/history.$SH 37 export INPUTRC=${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc 38 export MBSYNCRC=${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/mbsyncrc 39 export PASSWORD_STORE_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/password-store 40 export PYTHONSTARTUP=${XDG_CONFIG_HOME:-$HOME/.config}/pythonrc 41 export WGETRC=${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc 42 export LESSHISTFILE=${XDG_DATA_HOME:-$HOME/.local/share}/lesshst 43 export XAUTHORITY=${XDG_RUNTIME_DIR:-$HOME/.local/run}/Xauthority 44 export XINITRC=${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc 45 46 # Misc 47 # : Source $HOME/.config/okshrc (or your own shell) 48 export ENV=${XDG_CONFIG_HOME:-$HOME/.config}/${SH}rc 49 # : Use Unix's password-store's files for pash 50 export PASH_DIR=${PASSWORD_STORE_DIR:-$HOME/.password-store} 51 52 # Start X 53 if [ "$(tty)" = "/dev/tty1" ] || [ "$(tty)" = "/dev/ttyv0" ]; then 54 startx "$XINITRC" 55 fi