The configuration of Collin Doering
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.4KB

  1. # The following lines were added by compinstall
  2. zstyle ':completion:*' completer _list _expand _complete _ignored _match _correct _approximate _prefix
  3. zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
  4. zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-/,+]=** r:|=**' 'l:|=* r:|=*'
  5. zstyle ':completion:*' max-errors 5
  6. zstyle ':completion:*' preserve-prefix '//[^/]##/'
  7. zstyle :compinstall filename '/home/collin/.zshrc'
  8. autoload -Uz compinit
  9. compinit
  10. # End of lines added by compinstall
  11. # Lines configured by zsh-newuser-install
  12. HISTFILE=~/.histfile
  13. HISTSIZE=1000
  14. SAVEHIST=1000
  15. bindkey -e
  16. # End of lines configured by zsh-newuser-install
  17. # Check for an interactive session
  18. [ -z "$PS1" ] && return
  19. # 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)
  20. function disable_unit_run() {
  21. unit="$1"
  22. shift
  23. if [ "$(systemctl --user is-enabled $unit)" = "enabled" ]; then
  24. systemctl --user disable "$unit" >> /dev/null
  25. eval "$*"
  26. systemctl --user enable "$unit" >> /dev/null
  27. else
  28. eval "$*"
  29. fi
  30. }
  31. # Alias' to make command output prettier (use color with some commands by default)
  32. alias ls='ls --color=auto'
  33. alias grep='grep --color=auto'
  34. alias fgrep='fgrep --color-auto'
  35. alias egrep='egrep --color-auto'
  36. alias ncmpc='ncmpc -c'
  37. alias spacman='sudo pacman'
  38. # Alias' to make some commands a little less terse
  39. alias skreen='screen -c /dev/null'
  40. alias tranr='transmission-remote'
  41. alias ctl='systemctl'
  42. alias ctlu='systemctl --user'
  43. alias sctl='sudo systemctl'
  44. alias qemu='disable_unit_run unclutter qemu-system-x86_64 -enable-kvm'
  45. alias mplayer-ascii='mplayer -vo aa:driver=curses -monitorpixelaspect 0.5 -really-quiet'
  46. alias s='sudo'
  47. # Shortcuts for port-knocking on rekahsoft-mini *DEPRECIATED*
  48. alias knk='knock rekahsoft-mini 7713:tcp 1377:udp && sleep 3s && '
  49. alias knkc='knk ssh rekahsoft-mini '
  50. alias kgit='knk git'
  51. # Set colors to use with grep
  52. export GREP_COLOR="1;33"
  53. # Use source-highlight to make code in less syntax highlighted
  54. export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
  55. export LESS=' -R '
  56. # Set text/background colors for ls
  57. export LS_COLORS="di=01;37"
  58. # Set language * seems to be fixed by setting 256 color in .screerc)
  59. # Note: Breaks screen (characters show up incorrectly for ncmpcpp, alsamixer, perhaps others)
  60. # TODO: investigate and when solution found don't forget to port into ~/.bashrc
  61. # export LANG="en_US.UTF-8"
  62. # export LC_MESSAGES="C"
  63. PS1="[%n@%M: %~]%% "
  64. # Turn off noscroll
  65. stty stop undef
  66. # Modify path variable to allow execution of the following:
  67. # * mathematica / tools
  68. # * nxclient / associated tools
  69. # * maven tools
  70. 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
  71. ctlu import-environment PATH
  72. # Setup smlnj (AUR)
  73. export SMLNJ_HOME="/usr/lib/smlnj"
  74. ctlu import-environment SMLNJ_HOME
  75. # Setup gpg-agent
  76. if [ -f "${HOME}/.gpg-agent-info" ]; then
  77. . "${HOME}/.gpg-agent-info"
  78. export GPG_AGENT_INFO
  79. export SSH_AUTH_SOCK
  80. fi
  81. # start keychain
  82. #eval `keychain --eval --timeout 10 --quiet --agents ssh id_rsa`
  83. # Default editor
  84. export ALTERNATE_EDITOR=""
  85. export EDITOR="emacsclient -t" # $EDITOR should open in terminal
  86. export VISUAL="emacsclient -c -a emacs" # $VISUAL opens in GUI with non-daemon as alternate