dotfiles

My dotfiles: zsh, lf, sxiv, i3, ranger, mpd and more
Log | Files | Refs | Submodules | README | LICENSE

.zprofile (4051B)


      1 #!/bin/zsh
      2 
      3 # zsh profile file. Runs on login. Environmental variables are set here.
      4 
      5 # If you don't plan on reverting to bash, you can remove the link in ~/.profile
      6 # to clean up.
      7 
      8 # Adds `~/.local/bin` to $PATH
      9 export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
     10 
     11 # Default programs:
     12 export EDITOR="nvim"
     13 export TERMINAL="st"
     14 export BROWSER="brave"
     15 export READER="zathura"
     16 
     17 # ~/ Clean-up:
     18 export XDG_CONFIG_HOME="$HOME/.config"
     19 export XDG_DATA_HOME="$HOME/.local/share"
     20 export XDG_CACHE_HOME="$HOME/.cache"
     21 #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
     22 export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
     23 export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
     24 export LESSHISTFILE="-"
     25 export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
     26 export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc"
     27 export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
     28 #export GNUPGHOME="$XDG_DATA_HOME/gnupg"
     29 export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
     30 export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
     31 export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
     32 export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
     33 export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
     34 export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
     35 export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
     36 export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
     37 export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
     38 export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
     39 
     40 # Other program settings:
     41 export DICS="/usr/share/stardict/dic/"
     42 export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
     43 export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
     44 export LESS=-R
     45 export LESS_TERMCAP_mb="$(printf '%b' '')"
     46 export LESS_TERMCAP_md="$(printf '%b' '')"
     47 export LESS_TERMCAP_me="$(printf '%b' '')"
     48 export LESS_TERMCAP_so="$(printf '%b' '')"
     49 export LESS_TERMCAP_se="$(printf '%b' '')"
     50 export LESS_TERMCAP_us="$(printf '%b' '')"
     51 export LESS_TERMCAP_ue="$(printf '%b' '')"
     52 export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
     53 export QT_QPA_PLATFORMTHEME="gtk2"	# Have QT use gtk2 theme.
     54 export MOZ_USE_XINPUT2="1"		# Mozilla smooth scrolling/touchpads.
     55 export AWT_TOOLKIT="MToolkit wmname LG3D"	#May have to install wmname
     56 export _JAVA_AWT_WM_NONREPARENTING=1	# Fix for Java applications in dwm
     57 
     58 # This is the list for lf icons:
     59 export LF_ICONS="di=📁:\
     60 fi=📃:\
     61 tw=🤝:\
     62 ow=📂:\
     63 ln=⛓:\
     64 or=❌:\
     65 ex=🎯:\
     66 *.txt=✍:\
     67 *.mom=✍:\
     68 *.me=✍:\
     69 *.ms=✍:\
     70 *.png=🖼:\
     71 *.webp=🖼:\
     72 *.ico=🖼:\
     73 *.jpg=📸:\
     74 *.jpe=📸:\
     75 *.jpeg=📸:\
     76 *.gif=🖼:\
     77 *.svg=🗺:\
     78 *.tif=🖼:\
     79 *.tiff=🖼:\
     80 *.xcf=🖌:\
     81 *.html=🌎:\
     82 *.xml=📰:\
     83 *.gpg=🔒:\
     84 *.css=🎨:\
     85 *.pdf=📚:\
     86 *.djvu=📚:\
     87 *.epub=📚:\
     88 *.csv=📓:\
     89 *.xlsx=📓:\
     90 *.tex=📜:\
     91 *.md=📘:\
     92 *.r=📊:\
     93 *.R=📊:\
     94 *.rmd=📊:\
     95 *.Rmd=📊:\
     96 *.m=📊:\
     97 *.mp3=🎵:\
     98 *.opus=🎵:\
     99 *.ogg=🎵:\
    100 *.m4a=🎵:\
    101 *.flac=🎼:\
    102 *.mkv=🎥:\
    103 *.mp4=🎥:\
    104 *.webm=🎥:\
    105 *.mpeg=🎥:\
    106 *.avi=🎥:\
    107 *.zip=📦:\
    108 *.rar=📦:\
    109 *.7z=📦:\
    110 *.tar.gz=📦:\
    111 *.z64=🎮:\
    112 *.v64=🎮:\
    113 *.n64=🎮:\
    114 *.gba=🎮:\
    115 *.nes=🎮:\
    116 *.gdi=🎮:\
    117 *.1=ℹ:\
    118 *.nfo=ℹ:\
    119 *.info=ℹ:\
    120 *.log=📙:\
    121 *.iso=📀:\
    122 *.img=📀:\
    123 *.bib=🎓:\
    124 *.ged=👪:\
    125 *.part=💔:\
    126 *.torrent=🔽:\
    127 *.jar=♨:\
    128 *.java=♨:\
    129 "
    130 
    131 [ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 &
    132 
    133 if pacman -Qs libxft-bgra >/dev/null 2>&1; then
    134 	# Start graphical server on tty1 if not already running.
    135 	[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1  && exec startx
    136 else
    137 	echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
    138 Please run:
    139 	\033[32myay -S libxft-bgra\033[0m
    140 and replace \`libxft\`"
    141 fi
    142 
    143 # Switch escape and caps if tty and no passwd required:
    144 sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null