dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

profile.bak (3027B)


      1 #!/usr/bin/env sh
      2 
      3 # Profile file. Runs on login.
      4 
      5 # Adds ruby to path
      6 PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
      7 
      8 # Adds `~/.local/bin/` and all subdirectories to $PATH
      9 export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
     10 
     11 export EDITOR="nvim"
     12 export TERMINAL="st"
     13 export BROWSER="chromium"
     14 export READER="zathura"
     15 export FILE="nnn"
     16 
     17 export XDG_CONFIG_HOME="$HOME/.config"
     18 export XDG_DATA_HOME="$HOME/.local/share"
     19 export XDG_CACHE_HOME="$HOME/.cache"
     20 
     21 # export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # mess with this sometime
     22 
     23 export BIB="$HOME/repos/life/dox/acad.bib"
     24 export REFER="$HOME/repos/life/dox/thesis/thesis.refer"
     25 
     26 export CARGO_HOME="$XDG_DATA_HOME"/cargo
     27 export GEM_HOME="$XDG_DATA_HOME"/gem
     28 export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem
     29 export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
     30 
     31 export LESSHISTFILE="-"
     32 export SUDO_ASKPASS="$HOME/.local/bin/tools/dmenupass"
     33 export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
     34 export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
     35 export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
     36 export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
     37 export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc"
     38 export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
     39 export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
     40 export WAKATIME_HOME="$XDG_CONFIG_HOME"/wakatime
     41 export MAILCAPS="$XDG_CONFIG_HOME"/tuir/mailcap
     42 
     43 export CONDARC="${XDG_CONFIG_HOME:-$HOME/.config}/conda/.condarc"
     44 export IPYTHONDIR="${XDG_CONFIG_HOME:-$HOME/.config}/jupyter"
     45 export JUPYTER_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/jupyter"
     46 
     47 export R_ENVIRON_USER="${XDG_CONFIG_HOME:-$HOME/.config}/R/Renviron"
     48 
     49 export GPG_TTY=$(tty)
     50 export GPG_AGENT_INFO=""
     51 
     52 # less/man colors
     53 export LESS=-R
     54 export LESS_TERMCAP_mb="$(printf '%b' '')"; a="${a%_}"
     55 export LESS_TERMCAP_md="$(printf '%b' '')"; a="${a%_}"
     56 export LESS_TERMCAP_me="$(printf '%b' '')"; a="${a%_}"
     57 export LESS_TERMCAP_so="$(printf '%b' '')"; a="${a%_}"
     58 export LESS_TERMCAP_se="$(printf '%b' '')"; a="${a%_}"
     59 export LESS_TERMCAP_us="$(printf '%b' '')"; a="${a%_}"
     60 export LESS_TERMCAP_ue="$(printf '%b' '')"; a="${a%_}"
     61 
     62 mpd >/dev/null 2>&1 &
     63 
     64 [ ! -f ~/.config/shortcutrc ] && shortcuts >/dev/null 2>&1
     65 
     66 
     67 # Start SSH Agent automatically on login
     68 if [ -z "$SSH_AUTH_SOCK" ]
     69 then
     70    # Check for a currently running instance of the agent
     71    RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
     72    if [ "$RUNNING_AGENT" = "0" ]
     73    then
     74         # Launch a new instance of the agent
     75         ssh-agent -s &> .ssh/ssh-agent
     76    fi
     77    eval `cat .ssh/ssh-agent`
     78 fi
     79 
     80 # Start graphical server on tty1 if not already running.
     81 [ "$(tty)" = "/dev/tty1" ] && ! ps -e | grep -qw Xorg && exec startx "$XDG_CONFIG_HOME/X11/xinitrc" --
     82 
     83 # Switch escape and caps if tty:
     84 sudo -n loadkeys ~/.local/bin/ttymaps.kmap 2>/dev/null
     85 
     86 gpg-connect-agent updatestartuptty /bye >/dev/null