dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

.profile (4251B)


      1 # setup XDG environment variables
      2 test -z "$XDG_DATA_HOME" && export XDG_DATA_HOME="$HOME/.local/share"
      3 test -z "$XDG_CONFIG_HOME" && export XDG_CONFIG_HOME="$HOME/.config"
      4 test -z "$XDG_DATA_DIRS" && export XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
      5 test -z "$XDG_CONFIG_DIRS" && export XDG_CONFIG_DIRS="/etc/xdg"
      6 test -z "$XDG_CACHE_HOME" && export XDG_CACHE_HOME="$HOME/.cache"
      7 test -z "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir"
      8 
      9 # this is a window manager, not a desktop environment
     10 export XDG_DESKTOP_DIR="$HOME/"
     11 
     12 # create XDG_RUNTIME_DIR if non-existent
     13 if ! test -d "${XDG_RUNTIME_DIR}"; then
     14 	mkdir "${XDG_RUNTIME_DIR}"
     15 	chmod 0700 "${XDG_RUNTIME_DIR}"
     16 fi
     17 
     18 # set kshrc as ENV if it exists
     19 [ -f "$XDG_CONFIG_HOME/ksh/kshrc" ] && export ENV="$XDG_CONFIG_HOME/ksh/kshrc"
     20 
     21 # add local paths
     22 export PATH="$PATH:$HOME/.local/bin:/xtra/bin"
     23 
     24 # setup pseudo XDG support
     25 export ADB_VENDOR_KEY="$XDG_CONFIG_HOME/android"
     26 export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android"
     27 export DIALOGRC="$XDG_CONFIG_HOME/dialog/dialogrc"
     28 export DVDCSS_CACHE="$XDG_DATA_HOME/dvdcss"
     29 export GNUPGHOME="$XDG_DATA_HOME/gnupg"
     30 export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
     31 export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
     32 export LESSHISTFILE=-
     33 export LESSKEY="$XDG_CONFIG_HOME/less/lesskey"
     34 export MYSQL_HISTFILE="$XDG_DATA_HOME/mysql_history"
     35 export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages"
     36 export OCTAVE_HISTFILE="$XDG_CACHE_HOME/octave-hsts"
     37 export OCTAVE_SITE_INITFILE="$XDG_CONFIG_HOME/octave/octaverc"
     38 export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
     39 export TERMINFO="$XDG_DATA_HOME/terminfo"
     40 export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo:/usr/share/terminfo"
     41 export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
     42 export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc"
     43 export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
     44 export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
     45 export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
     46 export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
     47 
     48 # increase key rate
     49 xset q 2>/dev/null >/dev/null && xset r rate 300 50
     50 
     51 # setup miscellaneous environment variables
     52 export WM="dwm"
     53 export TERMINAL="/usr/local/bin/st"
     54 export VISUAL="vim"
     55 export EDITOR="$VISUAL"
     56 export BROWSER="/usr/local/bin/surf"
     57 export IMG_VIEWER="/usr/local/bin/sxiv"
     58 export PDF_VIEWER="/bin/zathura"
     59 export FZF_DEFAULT_OPTS="--bind='K:up,J:down,H:preview-up,L:preview-down'"
     60 export REFER="$HOME/documents/data/refer.bib"
     61 export GROFF_FONT_PATH="$XDG_DATA_HOME/fonts/groff"
     62 export GREP_COLORS="\
     63 ms=01;31:\
     64 mc=01;31:\
     65 sl=:\
     66 cx=:\
     67 fn=01;37:\
     68 ln=32:\
     69 bn=32:\
     70 se=36"
     71 export LS_COLORS="\
     72 no=00:\
     73 fi=00:\
     74 di=01;34:\
     75 ln=01;36:\
     76 pi=40;33:\
     77 so=01;36:\
     78 do=01;36:\
     79 bd=40;33;01:\
     80 cd=40;33;01:\
     81 or=40;31;01:\
     82 mi=01;05;37;41:\
     83 su=37;41:\
     84 sg=30;43:\
     85 ca=30;41:\
     86 tw=30;42:\
     87 ow=34;42:\
     88 st=37;44:\
     89 ex=01;32:\
     90 \
     91 *.tar=01;31:\
     92 *.tgz=01;31:\
     93 *.svgz=01;31:\
     94 *.arj=01;31:\
     95 *.taz=01;31:\
     96 *.lzh=01;31:\
     97 *.lzma=01;31:\
     98 *.zip=01;31:\
     99 *.z=01;31:\
    100 *.Z=01;31:\
    101 *.dz=01;31:\
    102 *.gz=01;31:\
    103 *.bz2=01;31:\
    104 *.tbz2=01;31:\
    105 *.bz=01;31:\
    106 *.tz=01;31:\
    107 *.deb=01;31:\
    108 *.rpm=01;31:\
    109 *.jar=01;31:\
    110 *.rar=01;31:\
    111 *.ace=01;31:\
    112 *.zoo=01;31:\
    113 *.cpio=01;31:\
    114 *.7z=01;31:\
    115 *.rz=01;31:\
    116 \
    117 *.jpg=01;36:\
    118 *.jpeg=01;36:\
    119 *.gif=01;36:\
    120 *.bmp=01;36:\
    121 *.pbm=01;36:\
    122 *.pgm=01;36:\
    123 *.ppm=01;36:\
    124 *.tga=01;36:\
    125 *.xbm=01;36:\
    126 *.xpm=01;36:\
    127 *.tif=01;36:\
    128 *.tiff=01;36:\
    129 *.ff.bz=01;36:\
    130 *.ff.gz=01;36:\
    131 *.ff.xz=01;36:\
    132 *.png=01;36:\
    133 *.mng=01;36:\
    134 *.pcx=01;36:\
    135 *.mov=01;36:\
    136 *.mpg=01;36:\
    137 *.mpeg=01;36:\
    138 *.m2v=01;36:\
    139 *.mkv=01;36:\
    140 *.ogm=01;36:\
    141 *.mp4=01;36:\
    142 *.m4v=01;36:\
    143 *.mp4v=01;36:\
    144 *.vob=01;36:\
    145 *.qt=01;36:\
    146 *.nuv=01;36:\
    147 *.wmv=01;36:\
    148 *.asf=01;36:\
    149 *.rm=01;36:\
    150 *.rmvb=01;36:\
    151 *.flc=01;36:\
    152 *.avi=01;36:\
    153 *.fli=01;36:\
    154 *.gl=01;36:\
    155 *.dl=01;36:\
    156 *.xcf=01;36:\
    157 *.xwd=01;36:\
    158 *.yuv=01;36:\
    159 *.svg=01;36:\
    160 *.pdf=01;36:\
    161 \
    162 *.aac=00;36:\
    163 *.au=00;36:\
    164 *.flac=00;36:\
    165 *.mid=00;36:\
    166 *.midi=00;36:\
    167 *.mka=00;36:\
    168 *.mp3=00;36:\
    169 *.mpc=00;36:\
    170 *.ogg=00;36:\
    171 *.ra=00;36:\
    172 *.wav=00;36:\
    173 "
    174 
    175 # To avoid potential situation where cdm(1) crashes on every TTY, here we
    176 # default to execute cdm(1) on tty1 only, and leave other TTYs untouched.
    177 if [ "$(tty)" = '/dev/tty1' ]; then
    178 	[ -n "$CDM_SPAWN" ] && return
    179 	# Avoid executing cdm(1) when X11 has already been started.
    180 	[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ] && exec cdm
    181 fi