Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.41 KB | None | 0 0
  1. # If you come from bash you might have to change your $PATH.
  2. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  3.  
  4. # Path to your oh-my-zsh installation.
  5. export ZSH="/home/archie/.oh-my-zsh"
  6.  
  7. # Set name of the theme to load --- if set to "random", it will
  8. # load a random theme each time oh-my-zsh is loaded, in which case,
  9. # to know which specific one was loaded, run: echo $RANDOM_THEME
  10. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
  11. ZSH_THEME="agnoster"
  12. # Set list of themes to pick from when loading at random
  13. # Setting this variable when ZSH_THEME=random will cause zsh to load
  14. # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
  15. # If set to an empty array, this variable will have no effect.
  16. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  17.  
  18. # Uncomment the following line to use case-sensitive completion.
  19. # CASE_SENSITIVE="true"
  20.  
  21. # Uncomment the following line to use hyphen-insensitive completion.
  22. # Case-sensitive completion must be off. _ and - will be interchangeable.
  23. # HYPHEN_INSENSITIVE="true"
  24.  
  25. # Uncomment the following line to disable bi-weekly auto-update checks.
  26. # DISABLE_AUTO_UPDATE="true"
  27.  
  28. # Uncomment the following line to change how often to auto-update (in days).
  29. # export UPDATE_ZSH_DAYS=13
  30.  
  31. # Uncomment the following line to disable colors in ls.
  32. # DISABLE_LS_COLORS="true"
  33.  
  34. # Uncomment the following line to disable auto-setting terminal title.
  35. # DISABLE_AUTO_TITLE="true"
  36.  
  37. # Uncomment the following line to enable command auto-correction.
  38. # ENABLE_CORRECTION="true"
  39.  
  40. # Uncomment the following line to display red dots whilst waiting for completion.
  41. # COMPLETION_WAITING_DOTS="true"
  42.  
  43. # Uncomment the following line if you want to disable marking untracked files
  44. # under VCS as dirty. This makes repository status check for large repositories
  45. # much, much faster.
  46. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  47.  
  48. # Uncomment the following line if you want to change the command execution time
  49. # stamp shown in the history command output.
  50. # You can set one of the optional three formats:
  51. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  52. # or set a custom format using the strftime function format specifications,
  53. # see 'man strftime' for details.
  54. # HIST_STAMPS="mm/dd/yyyy"
  55.  
  56. # Would you like to use another custom folder than $ZSH/custom?
  57. # ZSH_CUSTOM=/path/to/new-custom-folder
  58.  
  59. # Which plugins would you like to load?
  60. # Standard plugins can be found in ~/.oh-my-zsh/plugins/*
  61. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  62. # Example format: plugins=(rails git textmate ruby lighthouse)
  63. # Add wisely, as too many plugins slow down shell startup.
  64. # plugins=(git command-time)
  65.  
  66. source $ZSH/oh-my-zsh.sh
  67.  
  68. # User configuration
  69.  
  70. # export MANPATH="/usr/local/man:$MANPATH"
  71.  
  72. # You may need to manually set your language environment
  73. # export LANG=en_US.UTF-8
  74.  
  75. # Preferred editor for local and remote sessions
  76. # Compilation flags
  77. # export ARCHFLAGS="-arch x86_64"
  78.  
  79. # ssh
  80. # export SSH_KEY_PATH="~/.ssh/rsa_id"
  81.  
  82. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  83. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  84. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  85. # For a full list of active aliases, run `alias`.
  86. #
  87. # Example aliases
  88. # alias zshconfig="mate ~/.zshrc"
  89. # alias ohmyzsh="mate ~/.oh-my-zsh"
  90. #alias
  91. clear
  92. cowsay "Чайная диета"
  93. alias sdl="cd $1 && ls"
  94. alias pacman="sudo pacman"
  95. alias update="sudo pacman -Syy"
  96. alias upgrade="sudo pacman -Syyu"
  97. alias aur="pacaur"
  98. alias start="sudo systemctl start"
  99. alias enable="sudo systemctl enable"
  100. alias disable="sudo systemctl disable"
  101. alias make="make -j2"
  102. alias make-install="sudo make install"
  103. alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
  104. alias logs="sudo grep -i failed /var/log/* && sudo grep -i error /var/log/*"
  105. alias e="exit"
  106. alias l="ls"
  107. alias c="clear"
  108. alias la="ls -a"
  109. alias cp="cp -v"
  110. alias modprobe="sudo modprobe -v"
  111. alias mkinitcpio="sudo mkinitcpio -p"
  112. alias mem="watch free -h"
  113. alias temp="watch sensors"
  114. alias rim="sudo rim"
  115. alias powerpill="sudo powerpill"
  116. #colour
  117. if [ -f /usr/bin/grc ]; then
  118. alias gcc="grc --colour=auto gcc"
  119. alias irclog="grc --colour=auto irclog"
  120. alias log="grc --colour=auto log"
  121. alias netstat="grc --colour=auto netstat"
  122. alias ping="grc --colour=auto ping"
  123. alias proftpd="grc --colour=auto proftpd"
  124. alias traceroute="grc --colour=auto traceroute"
  125. alias lias grep="grep --color=auto"
  126. alias ls='ls --color=auto'
  127. alias я_обновлю_все_к_чертям="pacman -Su"
  128. fi
  129. unsetopt beep
  130. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  131. source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
  132.  
  133.  
  134. ex () {
  135. if [ -f $1 ] ; then
  136. case $1 in
  137. *.tar.bz2) tar xvjf $1 ;;
  138. *.tar.gz) tar xvzf $1 ;;
  139. *.tar.xz) tar xvfJ $1 ;;
  140. *.bz2) bunzip2 $1 ;;
  141. *.rar) unrar x $1 ;;
  142. *.gz) gunzip $1 ;;
  143. *.tar) tar xvf $1 ;;
  144. *.tbz2) tar xvjf $1 ;;
  145. *.tgz) tar xvzf $1 ;;
  146. *.zip) unzip $1 ;;
  147. *.Z) uncompress $1 ;;
  148. *.7z) 7z x $1 ;;
  149. *) echo "'$1' ну вот не могу распаковать ваш ёбанный архив" ;;
  150. esac
  151. else
  152. echo "'$1' не буду распаковывать этот хуевый архив"
  153. fi
  154. }
  155.  
  156. autoload -Uz compinit
  157. compinit
  158. setopt CORRECT_ALL
  159. SPROMPT="Опять с командой накосячил, ты хотел %r вместо %R? ([Y]/[N]/[E]) "
  160. setopt COMPLETE_ALIASES
  161.  
  162. zstyle ':completion::complete:*' gain-privileges 1
  163.  
  164. zsh_command_time() {
  165. if [ -n "$ZSH_COMMAND_TIME" ]; then
  166. hours=$(($ZSH_COMMAND_TIME/3600))
  167. min=$(($ZSH_COMMAND_TIME/60))
  168. sec=$(($ZSH_COMMAND_TIME%60))
  169. if [ "$ZSH_COMMAND_TIME" -le 60 ]; then
  170. timer_show="$fg[green]$ZSH_COMMAND_TIME s."
  171. elif [ "$ZSH_COMMAND_TIME" -gt 60 ] && [ "$ZSH_COMMAND_TIME" -le 180 ]; then
  172. timer_show="$fg[yellow]$min min. $sec s."
  173. else
  174. if [ "$hours" -gt 0 ]; then
  175. min=$(($min%60))
  176. timer_show="$fg[red]$hours h. $min min. $sec s."
  177. else
  178. timer_show="$fg[red]$min min. $sec s."
  179. fi
  180. fi
  181. printf "${ZSH_COMMAND_TIME_MSG}\n" "$timer_show"
  182. fi
  183. }
  184.  
  185. export PATH
  186. #export PAGER='vimpager'
  187. #alias less=$PAGER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement