2011-06-03 17:44:54 +00:00
# The following lines were added by compinstall
2012-06-18 21:00:34 +00:00
zstyle ':completion:*' completer _list _expand _complete _ignored _match _correct _approximate _prefix
2013-03-11 03:26:58 +00:00
zstyle ':completion:*' list-colors ${ (s. : .)LS_COLORS }
2012-06-18 21:00:34 +00:00
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-/,+]=** r:|=**' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 5
zstyle ':completion:*' preserve-prefix '//[^/]##/'
2011-06-03 17:44:54 +00:00
zstyle :compinstall filename '/home/collin/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE = ~/.histfile
HISTSIZE = 1000
SAVEHIST = 1000
bindkey -e
# End of lines configured by zsh-newuser-install
# Check for an interactive session
[ -z " $PS1 " ] && return
2013-11-03 03:18:16 +00:00
# A function that given a unit (run under the systemd user instance) and a command runs the command while temporarily suspending the given unit (service)
function disable_unit_run( ) {
unit = " $1 "
shift
if [ " $( systemctl --user is-enabled $unit ) " = "enabled" ] ; then
systemctl --user disable " $unit " >> /dev/null
eval " $* "
systemctl --user enable " $unit " >> /dev/null
else
eval " $* "
fi
2013-03-19 22:36:19 +00:00
}
2013-03-11 23:01:08 +00:00
# Alias' to make command output prettier (use color with some commands by default)
2011-06-03 17:44:54 +00:00
alias ls = 'ls --color=auto'
alias grep = 'grep --color=auto'
alias fgrep = 'fgrep --color-auto'
alias egrep = 'egrep --color-auto'
alias ncmpc = 'ncmpc -c'
2013-11-03 03:18:16 +00:00
alias spacman = 'sudo pacman'
2013-03-11 23:01:08 +00:00
# Alias' to make some commands a little less terse
2011-08-10 03:04:59 +00:00
alias skreen = 'screen -c /dev/null'
2012-03-08 05:22:28 +00:00
alias tranr = 'transmission-remote'
2013-11-03 03:18:16 +00:00
alias ctl = 'systemctl'
2013-03-11 03:26:58 +00:00
alias ctlu = 'systemctl --user'
2013-03-11 23:01:08 +00:00
alias sctl = 'sudo systemctl'
2013-11-03 03:18:16 +00:00
alias qemu = 'disable_unit_run unclutter qemu-system-x86_64 -enable-kvm'
2014-09-06 07:28:00 +00:00
alias mplayer-ascii= 'mplayer -vo aa:driver=curses -monitorpixelaspect 0.5 -really-quiet'
2013-03-11 23:01:08 +00:00
alias s = 'sudo'
2011-06-03 17:44:54 +00:00
2013-03-11 23:01:08 +00:00
# Shortcuts for port-knocking on rekahsoft-mini *DEPRECIATED*
alias knk = 'knock rekahsoft-mini 7713:tcp 1377:udp && sleep 3s && '
alias knkc = 'knk ssh rekahsoft-mini '
alias kgit = 'knk git'
# Set colors to use with grep
2011-06-03 17:44:54 +00:00
export GREP_COLOR = "1;33"
2011-10-24 23:52:46 +00:00
# Use source-highlight to make code in less syntax highlighted
export LESSOPEN = "| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS = ' -R '
2013-03-11 03:26:58 +00:00
# Set text/background colors for ls
export LS_COLORS = "di=01;37"
2013-03-19 22:36:19 +00:00
# Set language * seems to be fixed by setting 256 color in .screerc)
# Note: Breaks screen (characters show up incorrectly for ncmpcpp, alsamixer, perhaps others)
# TODO: investigate and when solution found don't forget to port into ~/.bashrc
# export LANG="en_US.UTF-8"
# export LC_MESSAGES="C"
2011-06-03 17:44:54 +00:00
PS1 = "[%n@%M: %~]%% "
# Turn off noscroll
stty stop undef
2011-06-21 00:55:55 +00:00
# Modify path variable to allow execution of the following:
2011-10-24 23:52:46 +00:00
# * mathematica / tools
# * nxclient / associated tools
2011-06-21 00:55:55 +00:00
# * maven tools
2014-10-23 07:13:32 +00:00
export PATH = $HOME /.cabal/bin:$HOME /.gem/ruby/2.0.0/bin:$HOME /.bin:$HOME /.texlive/2014/bin/x86_64-linux:${ PATH } :/opt/maven/bin:/opt/NX/bin:/usr/lib/smlnj/bin
ctlu import-environment PATH
# Setup smlnj (AUR)
export SMLNJ_HOME = "/usr/lib/smlnj"
ctlu import-environment SMLNJ_HOME
2014-09-06 07:28:00 +00:00
# Setup gpg-agent
if [ -f " ${ HOME } /.gpg-agent-info " ] ; then
. " ${ HOME } /.gpg-agent-info "
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
fi
2011-06-05 14:42:52 +00:00
2011-06-03 17:44:54 +00:00
# start keychain
2014-09-06 07:28:00 +00:00
#eval `keychain --eval --timeout 10 --quiet --agents ssh id_rsa`
2011-06-03 17:44:54 +00:00
# Default editor
2014-10-23 07:26:23 +00:00
export ALTERNATE_EDITOR = ""
export EDITOR = "emacsclient -t" # $EDITOR should open in terminal
export VISUAL = "emacsclient -c -a emacs" # $VISUAL opens in GUI with non-daemon as alternate