Skip to content

Instantly share code, notes, and snippets.

@glallen01
Created January 2, 2019 12:35
Show Gist options
  • Save glallen01/e6631abbe333585ca5d6669fb89a4cc4 to your computer and use it in GitHub Desktop.
Save glallen01/e6631abbe333585ca5d6669fb89a4cc4 to your computer and use it in GitHub Desktop.
Zsh rc
# Path to your oh-my-zsh installation.
export ZSH=/Users/gla/.oh-my-zsh
# See /usr/local/texlive/2018/index.html for links to documentation.
# The TeX Live web site (http://tug.org/texlive/) contains any updates and
# corrections. TeX Live is a joint project of the TeX user groups around the
# world; please consider supporting it by joining the group best for you. The
# list of groups is available on the web at http://tug.org/usergroups.html.
#
#
# Add /usr/local/texlive/2018/texmf-dist/doc/man to MANPATH.
# Add /usr/local/texlive/2018/texmf-dist/doc/info to INFOPATH.
# Most importantly, add /usr/local/texlive/2018/bin/x86_64-darwin
# to your PATH for current and future sessions.
# Logfile: /usr/local/texlive/2018/install-tl.log
# range-get-files <range-puppetmaster> <range-host> <path>
func range-get-files () { mkdir tmp-rangefiles ; cd tmp-rangefiles ; ssh -o StrictHostKeyChecking=no $1 "ssh -o StrictHostKeyChecking=no $2 \"tar cvzf - $3\"" | tar xvf - ; cd ..}
ZSH_THEME="essembeh"
alias t="task"
alias tt="/Users/gla/src/timewarrior/src/timew"
#alias bro='docker run -it --rm -v `pwd`:/pcap:rw blacktop/bro $@'
alias cat='cat -v'
alias isodate='date "+%g%m%d-%H%M"'
alias isodate2='date -u +"%Y-%m-%dT%H:%M:%SZ"'
alias aria2c='aria2c -c -x4 -j4'
MUTT=$(which mutt)
alias mutt="LOCAL_CONFIG=spool ${MUTT}"
alias mutt-hotmail="LOCAL_CONFIG=hotmail ${MUTT}"
alias mutt-syracuse="LOCAL_CONFIG=syracuse ${MUTT}"
alias mutt-gmail="LOCAL_CONFIG=gmail ${MUTT}"
alias mutt-circ="LOCAL_CONFIG=circadence ${MUTT}"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
taskwarrior
zsh-navigation-tools
boot2docker
docker
docker-compose
zsh-autosuggestions
)
# User configuration
source $ZSH/oh-my-zsh.sh
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
export LESS_TERMCAP_ZN=$(tput ssubm)
export LESS_TERMCAP_ZV=$(tput rsubm)
export LESS_TERMCAP_ZO=$(tput ssupm)
export LESS_TERMCAP_ZW=$(tput rsupm)
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
alias ls='ls -GF'
#To activate these completions, add the following to your .zshrc:
#fpath=(/usr/local/share/zsh-completions $fpath)
#You may also need to force rebuild `zcompdump`:
#rm -f ~/.zcompdump; compinit
#Additionally, if you receive "zsh compinit: insecure directories" warnings when attempting
#to load these completions, you may need to run this:
#chmod go-w '/usr/local/share'
source ~/.oh-my-zsh/custom/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source ~/.oh-my-zsh/custom/plugins/history-search-multi-word/history-search-multi-word.plugin.zsh
# fix for running in shell-mode inside emacs
if [ -n "$INSIDE_EMACS" ]; then
export TERM=dumb
else
export TERM=xterm-256color
fi
#disable bracketed paste mode:
printf "\e[?2004l"
# crypto setup
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
# use when sub-keys are loaded into multiple yubikeys, so ssh agent knows how to purge/reload
function swapyubikeys() {
{
killall -9 ssh-agent gpg-agent
for keystub in $(gpg --with-keygrip --list-secret-keys ${USERNAME} | grep Keygrip | awk '{print $3}'); do; rm ${HOME}/.gnupg/private-keys-v1.d/${keystub}.key; done;
gpg --card-status
eval $(gpgconf --launch gpg-agent)
ssh-add -l
} &> /Users/$USERNAME/bin/gpg-card-change.log
}
# go support
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"
if [[ $OSTYPE =~ "darwin" ]] ; then
# for iTerm2 24bit color:
export COLORTERM=truecolor
# for iTerm2 Integration
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Use OSX MDfind to find by filename, like locate
function mdname () { if [ $1 = "-i" ]; then shift mdfind "kMDItemDisplayName == '$@'c"; else mdfind "kMDItemDisplayName == $@"; fi }
fi
task calendar due
task summary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment