dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 837893efad70d9e4e0c8a8b1ef76e76631b01baf
parent ff400931f84a47fda6cada73ead0ce3f97a58494
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Tue, 17 Sep 2019 20:48:00 -0400

Shell: Change init scripts format to tabs

Diffstat:
M.profile | 76++++++++++++++++++++++++++++++++++++++--------------------------------------
M.shrc | 72++++++++++++++++++++++++++++++++++++------------------------------------
2 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/.profile b/.profile @@ -5,16 +5,16 @@ if [ "$0" = "sh" -o "$0" = "-sh" ] then - HOSTNAME=`hostname | cut -d . -f 1`; export HOSTNAME - ENV="$HOME/.shrc"; export ENV - printf "\033]0;${LOGNAME}@${HOSTNAME}\007" + HOSTNAME=`hostname | cut -d . -f 1`; export HOSTNAME + ENV="$HOME/.shrc"; export ENV + printf "\033]0;${LOGNAME}@${HOSTNAME}\007" fi if type ed > /dev/null 2>&1 then - EDITOR=ed + EDITOR=ed else - EDITOR=ex + EDITOR=ex fi VISUAL=vi @@ -26,53 +26,53 @@ WWW_HOME=https://danielmoch.com; export WWW_HOME if type lesspipe > /dev/null 2>&1 then - eval `lesspipe` + eval `lesspipe` else - LESSOPEN="|$HOME/.lessfilter %s" - export LESSOPEN + LESSOPEN="|$HOME/.lessfilter %s" + export LESSOPEN fi if type brew > /dev/null 2>&1 then - HOMEBREW_NO_ANALYTICS=1 - HOMEBREW_NO_INSECURE_REDIRECT=1 - HOMEBREW_CASK_OPTS=--require-sha\ --appdir="$HOME/Applications" - HOMEBREW_NO_AUTO_UPDATE=1 - export HOMEBREW_NO_ANALYTICS HOMEBREW_NO_INSECURE_REDIRECT - export HOMEBREW_CASK_OPTS HOMEBREW_NO_AUTO_UPDATE + HOMEBREW_NO_ANALYTICS=1 + HOMEBREW_NO_INSECURE_REDIRECT=1 + HOMEBREW_CASK_OPTS=--require-sha\ --appdir="$HOME/Applications" + HOMEBREW_NO_AUTO_UPDATE=1 + export HOMEBREW_NO_ANALYTICS HOMEBREW_NO_INSECURE_REDIRECT + export HOMEBREW_CASK_OPTS HOMEBREW_NO_AUTO_UPDATE fi if type go > /dev/null 2>&1 then - GOPATH="$HOME/.go" - export GOPATH + GOPATH="$HOME/.go" + export GOPATH fi QT_AUTO_SCREEN_SCALE_FACTOR=1; export QT_AUTO_SCREEN_SCALE_FACTOR __addpath () { - if [ -d "$1" ] - then - case ":$PATH:" in - *:"$1":*) - ;; - *) - if [ -z "$2" ] - then - PATH="$PATH:$1" - else - PATH="$1:$PATH" - fi - esac - fi + if [ -d "$1" ] + then + case ":$PATH:" in + *:"$1":*) + ;; + *) + if [ -z "$2" ] + then + PATH="$PATH:$1" + else + PATH="$1:$PATH" + fi + esac + fi } __addpath "$HOME/.go/bin" __addpath "$HOME/.cargo/bin" if type brew > /dev/null 2>&1 then - __addpath "`brew --prefix`/bin" "before" + __addpath "`brew --prefix`/bin" "before" fi __addpath "$HOME/.local/bin" "before" @@ -81,17 +81,17 @@ export PATH if [ -z "$SSH_TTY" ] && type gpgconf > /dev/null 2>&1 then - if [ "`gpgconf --list-dirs agent-ssh-socket | wc -l`" -eq 1 ] - then - unset SSH_AGENT_PID - SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket` - export SSH_AUTH_SOCK - fi + if [ "`gpgconf --list-dirs agent-ssh-socket | wc -l`" -eq 1 ] + then + unset SSH_AGENT_PID + SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket` + export SSH_AUTH_SOCK + fi fi if type my-init > /dev/null 2>&1 && [ ! -f "$HOME/._.djmoch" ] then - my-init + my-init fi my login diff --git a/.shrc b/.shrc @@ -7,42 +7,42 @@ set -o emacs __ps1() { - echo -n $LOGNAME@$HOSTNAME: - if [ "$PWD" = "$HOME" ] - then - echo -n '~' - else - echo -n $(basename $PWD) - fi + echo -n $LOGNAME@$HOSTNAME: + if [ "$PWD" = "$HOME" ] + then + echo -n '~' + else + echo -n $(basename $PWD) + fi - if type git > /dev/null 2>&1 - then - if git rev-parse --show-toplevel > /dev/null 2>&1 - then - gitref=$(git rev-parse --abbrev-ref HEAD) - if [ $gitref = HEAD ] - then - gitref=\($(git rev-parse --short HEAD)\) - fi - echo " ($gitref)" - else - echo - fi - fi + if type git > /dev/null 2>&1 + then + if git rev-parse --show-toplevel > /dev/null 2>&1 + then + gitref=$(git rev-parse --abbrev-ref HEAD) + if [ $gitref = HEAD ] + then + gitref=\($(git rev-parse --short HEAD)\) + fi + echo " ($gitref)" + else + echo + fi + fi } PS1='$(__ps1)\$ ' export PS1 if type dircolors > /dev/null 2>&1 then - alias ls="ls --color=never" - LSCOLORPARAM="--color=never" + alias ls="ls --color=never" + LSCOLORPARAM="--color=never" else - LSCOLORPARAM="" + LSCOLORPARAM="" fi num() { - pr -tn "$1" | $PAGER + pr -tn "$1" | $PAGER } alias ll="ls $LSCOLORPARAM -l" @@ -65,30 +65,30 @@ alias psu="ps -U $LOGNAME" if [ "$VISUAL" = "vi" ] then - alias vim="vi" + alias vim="vi" fi case `uname -s` in - *Darwin*) - alias jackd="jackd -d coreaudio > /dev/null 2>&1 &" - ;; + *Darwin*) + alias jackd="jackd -d coreaudio > /dev/null 2>&1 &" + ;; esac if echo $LANG | grep UTF-8 > /dev/null 2>&1 then - alias screen="screen -U" + alias screen="screen -U" fi if type gpg-connect-agent > /dev/null 2>&1 then - GPG_TTY=`tty`; export GPG_TTY - gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1 + GPG_TTY=`tty`; export GPG_TTY + gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1 fi if [ ! -f "$HOME/.hushlogin" ] then - if [ -r /etc/motd -a -n "$DISPLAY" -a -z "$SSH_TTY" ] - then - [ $SHLVL -le 1 ] && cat /etc/motd - fi + if [ -r /etc/motd -a -n "$DISPLAY" -a -z "$SSH_TTY" ] + then + [ $SHLVL -le 1 ] && cat /etc/motd + fi fi