Advertisement
MrdodgerX

zshrc gaara

Aug 24th, 2020
2,211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
  2. # Initialization code that may require console input (password prompts, [y/n]
  3. # confirmations, etc.) must go above this block; everything else may go below.
  4. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  5.   source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
  6. fi
  7.  
  8. # If you come from bash you might have to change your $PATH.
  9. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  10.  
  11. # Path to your oh-my-zsh installation.
  12. ZSH=/usr/share/oh-my-zsh/
  13.  
  14. # Set name of the theme to load --- if set to "random", it will
  15. # load a random theme each time oh-my-zsh is loaded, in which case,
  16. # to know which specific one was loaded, run: echo $RANDOM_THEME
  17. # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
  18. ZSH_THEME="robbyrussell"
  19.  
  20. # Set list of themes to pick from when loading at random
  21. # Setting this variable when ZSH_THEME=random will cause zsh to load
  22. # a theme from this variable instead of looking in $ZSH/themes/
  23. # If set to an empty array, this variable will have no effect.
  24. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  25.  
  26. # Uncomment the following line to use case-sensitive completion.
  27. # CASE_SENSITIVE="true"
  28.  
  29. # Uncomment the following line to use hyphen-insensitive completion.
  30. # Case-sensitive completion must be off. _ and - will be interchangeable.
  31. # HYPHEN_INSENSITIVE="true"
  32.  
  33. # Uncomment the following line to disable bi-weekly auto-update checks.
  34. DISABLE_AUTO_UPDATE="true"
  35.  
  36. # Uncomment the following line to automatically update without prompting.
  37. # DISABLE_UPDATE_PROMPT="true"
  38.  
  39. # Uncomment the following line to change how often to auto-update (in days).
  40. # export UPDATE_ZSH_DAYS=13
  41.  
  42. # Uncomment the following line if pasting URLs and other text is messed up.
  43. # DISABLE_MAGIC_FUNCTIONS="true"
  44.  
  45. # Uncomment the following line to disable colors in ls.
  46. # DISABLE_LS_COLORS="true"
  47.  
  48. # Uncomment the following line to disable auto-setting terminal title.
  49. # DISABLE_AUTO_TITLE="true"
  50.  
  51. # Uncomment the following line to enable command auto-correction.
  52. # ENABLE_CORRECTION="true"
  53.  
  54. # Uncomment the following line to display red dots whilst waiting for completion.
  55. # COMPLETION_WAITING_DOTS="true"
  56.  
  57. # Uncomment the following line if you want to disable marking untracked files
  58. # under VCS as dirty. This makes repository status check for large repositories
  59. # much, much faster.
  60. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  61.  
  62. # Uncomment the following line if you want to change the command execution time
  63. # stamp shown in the history command output.
  64. # You can set one of the optional three formats:
  65. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  66. # or set a custom format using the strftime function format specifications,
  67. # see 'man strftime' for details.
  68. # HIST_STAMPS="mm/dd/yyyy"
  69.  
  70. #SAVEHIST=10
  71. #HISTFILE=~/.zsh_history
  72.  
  73. # Would you like to use another custom folder than $ZSH/custom?
  74. # ZSH_CUSTOM=/path/to/new-custom-folder
  75.  
  76. # Which plugins would you like to load?
  77. # Standard plugins can be found in $ZSH/plugins/
  78. # Custom plugins may be added to $ZSH_CUSTOM/plugins/
  79. # Example format: plugins=(rails git textmate ruby lighthouse)
  80. # Add wisely, as too many plugins slow down shell startup.
  81. plugins=(git)
  82.  
  83.  
  84. # User configuration
  85.  
  86. # export MANPATH="/usr/local/man:$MANPATH"
  87.  
  88. # You may need to manually set your language environment
  89. # export LANG=en_US.UTF-8
  90.  
  91. # Preferred editor for local and remote sessions
  92. # if [[ -n $SSH_CONNECTION ]]; then
  93. #   export EDITOR='vim'
  94. # else
  95. #   export EDITOR='mvim'
  96. # fi
  97.  
  98. # Compilation flags
  99. # export ARCHFLAGS="-arch x86_64"
  100.  
  101. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  102. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  103. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  104. # For a full list of active aliases, run `alias`.
  105. #
  106. # Example aliases
  107. # alias zshconfig="mate ~/.zshrc"
  108. # alias ohmyzsh="mate ~/.oh-my-zsh"
  109.  
  110. ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
  111. if [[ ! -d $ZSH_CACHE_DIR ]]; then
  112.   mkdir $ZSH_CACHE_DIR
  113. fi
  114.  
  115.  
  116. ### SOURCE ###
  117. source $ZSH/oh-my-zsh.sh
  118. source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
  119.  
  120. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
  121. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
  122.  
  123. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  124. source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
  125.  
  126. ### ALIASES ###
  127.  
  128. # navigation
  129. alias ..='cd ..'
  130. alias ...='cd ../..'
  131. alias .3='cd ../../..'
  132. alias .4='cd ../../../..'
  133. alias .5='cd ../../../../..'
  134.  
  135. # pacman and yay
  136. alias pacsyu='sudo pacman -Syyu'                 # update only standard pkgs
  137. alias yaysua="yay -Sua --noconfirm"              # update only AUR pkgs
  138. alias yaysyu="yay -Syu --noconfirm"              # update standard pkgs and AUR pkgs
  139. alias unlock="sudo rm /var/lib/pacman/db.lck"    # remove pacman lock
  140. alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' # remove orphaned packages
  141.  
  142. # get fastest mirrors
  143. alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
  144. alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
  145. alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
  146. alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
  147.  
  148. # Changing "ls" to "exa"
  149. alias ls='exa -al --color=always --group-directories-first' # my preferred listing
  150. alias la='exa -a --color=always --group-directories-first'  # all files and dirs
  151. alias ll='exa -l --color=always --group-directories-first'  # long format
  152. alias lt='exa -aT --color=always --group-directories-first' # tree listing
  153. alias l.='exa -a | egrep "^\."'
  154.  
  155. # Colorize grep output (good for log files)
  156. alias grep='grep --color=auto'
  157. alias egrep='egrep --color=auto'
  158. alias fgrep='fgrep --color=auto'
  159.  
  160. # confirm before overwriting something
  161. alias cp="cp -i"
  162. alias mv='mv -i'
  163. alias rm='rm -i'
  164.  
  165. # adding flags
  166. alias df='df -h'                          # human-readable sizes
  167. alias free='free -m'                      # show sizes in MB
  168.  
  169. ## get top process eating memory
  170. alias psmem='ps auxf | sort -nr -k 4'
  171. alias psmem10='ps auxf | sort -nr -k 4 | head -10'
  172.  
  173. ## get top process eating cpu ##
  174. alias pscpu='ps auxf | sort -nr -k 3'
  175. alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
  176.  
  177. # git
  178. alias addup='git add -u'
  179. alias addall='git add .'
  180. alias branch='git branch'
  181. alias checkout='git checkout'
  182. alias clone='git clone'
  183. alias commit='git commit -m'
  184. alias fetch='git fetch'
  185. alias pull='git pull origin'
  186. alias push='git push origin'
  187. alias status='git status'
  188. alias tag='git tag'
  189. alias newtag='git tag -a'
  190.  
  191. # shutdown or reboot
  192. alias ssn="sudo shutdown now"
  193. alias sr="sudo reboot"
  194.  
  195.  
  196. # get error messages from journalctl
  197. alias jctl="journalctl -p 3 -xb"
  198.  
  199. # gpg encryption
  200. # verify signature for isos
  201. alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
  202. # receive the key of a developer
  203. alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
  204.  
  205. # youtube-dl
  206. alias yta-aac="youtube-dl --extract-audio --audio-format aac "
  207. alias yta-best="youtube-dl --extract-audio --audio-format best "
  208. alias yta-flac="youtube-dl --extract-audio --audio-format flac "
  209. alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
  210. alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
  211. alias yta-opus="youtube-dl --extract-audio --audio-format opus "
  212. alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
  213. alias yta-wav="youtube-dl --extract-audio --audio-format wav "
  214. alias ytv-best="youtube-dl -f bestvideo+bestaudio "
  215.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement