Advertisement
ygoreus

zshrc

Nov 26th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. #
  2. # ~/.zshrc
  3. #
  4. # Author: ygoreus
  5. # Version: 0.1
  6. # Date: Oct 13 2014
  7. #
  8.  
  9. # If not running interactively, don't do anything
  10. [[ $- != *i* ]] && return
  11.  
  12. # History
  13. HISTFILE=~/.config/zsh/.histfile
  14. HISTSIZE=100000
  15. SAVEHIST=100000
  16.  
  17. ## Disable setting the terminal title.
  18. DISABLE_AUTO_TITLE="true"
  19.  
  20. ## Display waiting dots "..." when waiting on suggestions.
  21. COMPLETION_WAITING_DOTS="true"
  22.  
  23. # Set to this to use case-sensitive completion.
  24. CASE_SENSITIVE="true"
  25.  
  26. # Comment this out to disable bi-weekly auto-update checks
  27. DISABLE_AUTO_UPDATE="true"
  28.  
  29. ## Variables
  30. export EDITOR="vim"
  31. export PAGER="vimpager"
  32. export BROWSER="dwb"
  33. export MOVPLAY="vlc"
  34. export PICVIEW="ristretto"
  35. export SNDPLAY="vlc"
  36. export TERMINAL="terminator"
  37.  
  38. # Listing
  39. alias ls='ls -xF --group-directories-first --color=always'
  40. alias lh='ls -A'
  41. alias ll='ls -lh'
  42. alias la='ll -A'
  43.  
  44. # Package Manager
  45. alias cUc='checkupdates | wc -l'
  46. alias cU='checkupdates'
  47.  
  48. alias pS='pacaur -S'
  49. alias pSy='pS -y'
  50. alias pSyy='pS -yy'
  51. alias pSu='pS -u'
  52. alias pSyu='pS -yu'
  53. alias pSyyu='pS -yyu'
  54.  
  55. alias pSs='pacaur -Ss'
  56. alias pSi='pS -i'
  57. alias pQ='pacaur -Q'
  58. alias pQs='pQ -s'
  59. alias pQi='pQ -i'
  60.  
  61. alias pR='pacaur -R'
  62. alias pRsn='pR -sn'
  63.  
  64. # Editing Openbox config files.
  65. alias obcl='obxprop | grep "^_OB_APP"'
  66. alias vOm='vim ~/.config/openbox/menu.xml'
  67. alias vOa='vim ~/.config/openbox/autostart'
  68. alias vOe='vim ~/.config/openbox/environment'
  69. alias vOr='vim ~/.config/openbox/rc.xml'
  70. alias vOl='sudo vim /etc/oblogout.conf'
  71.  
  72. # Editing tint2
  73. alias vTr='vim ~/.config/tint2/tint2rc'
  74.  
  75. # Editing Conky
  76. alias vCr='vim ~/.config/conky/arch.conkyrc'
  77. alias vCl='vim ~/.config/conky/gauges_conky.lua'
  78.  
  79. ## Editing Xresources
  80. alias vXr='vim ~/.Xresources'
  81. alias XTR='xrdb -merge ~/.Xresources'
  82. alias vXi='vim ~/.xinitrc'
  83. alias vX='vim ~/.xmonad/openbox.xmobarrc'
  84.  
  85. ## Editing XMonad configs
  86. alias vXb='vim ~/.xmonad/xmonad.xmobarrc'
  87. alias vXm='vim ~/.xmonad/xmonad.hs'
  88.  
  89. ## Zshell config and history.
  90. alias vZr='vim ~/.zshrc'
  91. alias vZh='vim ~/.config/zsh/.histfile'
  92.  
  93. ## Vim stuff
  94. alias vVr='vim ~/.vimrc'
  95. alias edit='vim'
  96. alias vi='vim'
  97.  
  98. # Disallow changing permissions on '/'
  99. alias chown='chown --preserve-root'
  100. alias chmod='chmod --preserve-root'
  101. alias chgrp='chgrp --preserve-root'
  102.  
  103. # Short-hand
  104. alias c='clear'
  105. alias q='exit'
  106. alias g='grep'
  107. alias h='history'
  108. alias k='kill'
  109.  
  110. # Other assorted aliases
  111. alias visudo='EDITOR=vim visudo'
  112. alias vS='visduo'
  113. alias a3='clear && archey3'
  114. alias sf='clear && screenfetch -D "Parabola"'
  115. alias sfs='clear && screenfetch -D "Parabola" -s'
  116. alias tux='clear && cowthink -W 75 -f tux $(fortune)'
  117. alias c='clear'
  118. alias q='exit'
  119. alias root='sudo -s'
  120.  
  121. ## Changing directories
  122. alias home='cd ~'
  123. alias Backup='cd ~/.backups'
  124. alias Scripts='cd ~/.scripts'
  125. alias cd..='cd ..'
  126. alias ..='cd..'
  127. alias ...='../..'
  128. alias ....='../../..'
  129.  
  130. ## Add confirmations
  131. alias cp='cp -i'
  132. alias mv='mv -i'
  133. alias rm='rm -I --preserve-root'
  134. alias ln='ln -i'
  135.  
  136.  
  137. # Settings made by ZSH Startup
  138. bindkey -e
  139. setopt appendhistory autocd extendedglob nomatch
  140. unsetopt beep notify
  141. zstyle :compinstall filename '~/.zshrc'
  142. autoload -Uz compinit
  143. compinit
  144.  
  145. ## Functions
  146. function cds ()
  147. {
  148. cd $1
  149. ls
  150. }
  151.  
  152. function cdh ()
  153. {
  154. cd $1
  155. lh
  156. }
  157.  
  158. function cdl ()
  159. {
  160. cd $1
  161. ll
  162. }
  163.  
  164. function cda ()
  165. {
  166. cd $1
  167. la
  168. }
  169.  
  170. function yt ()
  171. {
  172. cd ~/Media/Videos/Youtube/
  173. youtube-dl $1
  174. cd ~
  175. }
  176.  
  177. # Colors
  178. autoload -U colors && colors
  179.  
  180. ## Shell Prompt
  181. PROMPT=$'%{\e[1;36m%}%n%{\e[0m%} @ %{\e[1;34m%} { %3~ } %{\e[0m%}
  182. %{\e[1;32m%} ⏩%{\e[0m%} '
  183.  
  184. sf
  185.  
  186. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement