poetician

.zshrc

Sep 22nd, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.42 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. Path="$HOME/ .cargo/bin${PATH:+:${PATH}}"
  4.  
  5. # Path to your oh-my-zsh installation.
  6. #installation via script from github
  7. #export ZSH="/home/$USER/.oh-my-zsh"
  8. #installation via yay -S oh-my-zsh-git
  9. export ZSH=/usr/share/oh-my-zsh/
  10.  
  11. # Set name of the theme to load --- if set to "random", it will
  12. # load a random theme each time oh-my-zsh is loaded, in which case,
  13. # to know which specific one was loaded, run: echo $RANDOM_THEME
  14. # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
  15. ZSH_THEME="jonathan"
  16.  
  17. # Set list of themes to pick from when loading at random
  18. # Setting this variable when ZSH_THEME=random will cause zsh to load
  19. # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
  20. # If set to an empty array, this variable will have no effect.
  21. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
  22.  
  23. # Uncomment the following line to use case-sensitive completion.
  24. # CASE_SENSITIVE="true"
  25.  
  26. # Uncomment the following line to use hyphen-insensitive completion.
  27. # Case-sensitive completion must be off. _ and - will be interchangeable.
  28. # HYPHEN_INSENSITIVE="true"
  29.  
  30. # Uncomment the following line to disable bi-weekly auto-update checks.
  31. # DISABLE_AUTO_UPDATE="true"
  32.  
  33. # Uncomment the following line to automatically update without prompting.
  34. # DISABLE_UPDATE_PROMPT="true"
  35.  
  36. # Uncomment the following line to change how often to auto-update (in days).
  37. # export UPDATE_ZSH_DAYS=13
  38.  
  39. # Uncomment the following line if pasting URLs and other text is messed up.
  40. # DISABLE_MAGIC_FUNCTIONS=true
  41.  
  42. # Uncomment the following line to disable colors in ls.
  43. # DISABLE_LS_COLORS="true"
  44.  
  45. # Uncomment the following line to disable auto-setting terminal title.
  46. # DISABLE_AUTO_TITLE="true"
  47.  
  48. # Uncomment the following line to enable command auto-correction.
  49. # ENABLE_CORRECTION="true"
  50.  
  51. # Uncomment the following line to display red dots whilst waiting for completion.
  52. COMPLETION_WAITING_DOTS="true"
  53.  
  54. # Uncomment the following line if you want to disable marking untracked files
  55. # under VCS as dirty. This makes repository status check for large repositories
  56. # much, much faster.
  57. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  58.  
  59. # Uncomment the following line if you want to change the command execution time
  60. # stamp shown in the history command output.
  61. # You can set one of the optional three formats:
  62. # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  63. # or set a custom format using the strftime function format specifications,
  64. # see 'man strftime' for details.
  65. # HIST_STAMPS="mm/dd/yyyy"
  66.  
  67. # Would you like to use another custom folder than $ZSH/custom?
  68. # ZSH_CUSTOM=/path/to/new-custom-folder
  69.  
  70. # Which plugins would you like to load?
  71. # Standard plugins can be found in ~/.oh-my-zsh/plugins/*
  72. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  73. # Example format: plugins=(rails git textmate ruby lighthouse)
  74. # Add wisely, as too many plugins slow down shell startup.
  75. plugins=(git)
  76.  
  77. source $ZSH/oh-my-zsh.sh
  78.  
  79. # User configuration
  80.  
  81. # export MANPATH="/usr/local/man:$MANPATH"
  82.  
  83. # You may need to manually set your language environment
  84. # export LANG=en_US.UTF-8
  85.  
  86. # Preferred editor for local and remote sessions
  87. # if [[ -n $SSH_CONNECTION ]]; then
  88. # export EDITOR='vim'
  89. # else
  90. # export EDITOR='mvim'
  91. # fi
  92.  
  93. # Compilation flags
  94. # export ARCHFLAGS="-arch x86_64"
  95.  
  96. #### ARCOLINUX SETTINGS ####
  97.  
  98. source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  99.  
  100. setopt GLOB_DOTS
  101.  
  102. # If not running interactively, don't do anything
  103. [[ $- != *i* ]] && return
  104.  
  105. export HISTCONTROL=ignoreboth:erasedups
  106.  
  107. #PS1='[\u@\h \W]\$ '
  108.  
  109. if [ -d "$HOME/.bin" ] ;
  110. then PATH="$HOME/.bin:$PATH"
  111. fi
  112.  
  113. if [ -d "$HOME/.local/bin" ] ;
  114. then PATH="$HOME/.local/bin:$PATH"
  115. fi
  116.  
  117. #list
  118. alias ls='exa -al --color=always --group-directories-first'
  119. alias la='ls -a'
  120. alias ll='ls -la'
  121. alias l='ls'
  122. alias l.="ls -A | egrep '^\.'"
  123.  
  124. #fix obvious typo's
  125. alias cd..='cd ..'
  126. alias pdw="pwd"
  127.  
  128. ## Colorize the grep command output for ease of use (good for log files)##
  129. alias grep='grep --color=auto'
  130. alias egrep='egrep --color=auto'
  131. alias fgrep='fgrep --color=auto'
  132.  
  133. #readable output
  134. alias df='df -h'
  135.  
  136. #pacman unlock
  137. alias unlock="sudo rm /var/lib/pacman/db.lck"
  138.  
  139. #free
  140. alias free="free -mt"
  141.  
  142. #use all cores
  143. alias uac="sh ~/.bin/main/000*"
  144.  
  145. #continue download
  146. alias wget="wget -c"
  147.  
  148. #userlist
  149. alias userlist="cut -d: -f1 /etc/passwd"
  150.  
  151. #merge new settings
  152. alias merge="xrdb -merge ~/.Xresources"
  153.  
  154. # Aliases for software managment
  155. # pacman or pm
  156. alias pacman='sudo pacman --color auto'
  157. alias up='sudo pacman -Syyu'
  158.  
  159. # yay as aur helper - updates everything
  160. alias pksyua="yay -Syu --noconfirm"
  161. alias all="yay -Syu --noconfirm"
  162.  
  163. #ps
  164. alias psa="ps auxf"
  165. alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
  166.  
  167. #grub update
  168. alias upgrub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
  169.  
  170. #add new fonts
  171. alias update-fc='sudo fc-cache -fv'
  172.  
  173. #copy/paste all content of /etc/skel over to home folder - backup of config created - beware
  174. alias skel='cp -Rf ~/.config ~/.config-backup-$(date +%Y.%m.%d-%H.%M.%S) && cp -rf /etc/skel/* ~'
  175. #backup contents of /etc/skel to hidden backup folder in home/user
  176. alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)'
  177.  
  178. #copy bashrc-latest over on bashrc - cb= copy bashrc
  179. #alias cb='sudo cp /etc/skel/.bashrc ~/.bashrc && source ~/.bashrc'
  180. #copy /etc/skel/.zshrc over on ~/.zshrc - cb= copy zshrc
  181. alias cz='sudo cp /etc/skel/.zshrc ~/.zshrc && source ~/.zshrc'
  182.  
  183. #switch between bash and zsh
  184. alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
  185. alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
  186.  
  187. #quickly kill conkies
  188. alias kc='killall conky'
  189.  
  190. #hardware info --short
  191. alias hw="hwinfo --short"
  192.  
  193. #skip integrity check
  194. alias yayskip='yay -S --mflags --skipinteg'
  195. alias trizenskip='trizen -S --skipinteg'
  196.  
  197. #check vulnerabilities microcode
  198. alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
  199.  
  200. #get fastest mirrors in your neighborhood
  201. alias mr="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
  202. alias mrd="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
  203. alias mrs="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
  204. alias mra="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
  205.  
  206. #mounting the folder Public for exchange between host and guest on virtualbox
  207. alias vbm="sudo /usr/local/bin/arcolinux-vbox-share"
  208.  
  209. #shopt
  210. #shopt -s autocd # change to named directory
  211. #shopt -s cdspell # autocorrects cd misspellings
  212. #shopt -s cmdhist # save multi-line commands in history as single line
  213. #shopt -s dotglob
  214. #shopt -s histappend # do not overwrite history
  215. #shopt -s expand_aliases # expand aliases
  216.  
  217. #youtube-dl
  218. alias yta-aac="youtube-dl --extract-audio --audio-format aac "
  219. alias yta-best="youtube-dl --extract-audio --audio-format best "
  220. alias yta-flac="youtube-dl --extract-audio --audio-format flac "
  221. alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
  222. alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
  223. alias yta-opus="youtube-dl --extract-audio --audio-format opus "
  224. alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
  225. alias yta-wav="youtube-dl --extract-audio --audio-format wav "
  226.  
  227. alias ytv="youtube-dl -f bestvideo+bestaudio "
  228.  
  229. #Recent Installed Packages
  230. alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
  231. alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl"
  232.  
  233. #Cleanup orphaned packages
  234. alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
  235.  
  236. #get the error messages from journalctl
  237. alias jctl="journalctl -p 3 -xb"
  238.  
  239. #nano for important configration files
  240. #know what you do in these files
  241. alias nlightdm="sudo nano /etc/lightdm/lightdm.conf"
  242. alias npacman="sudo nano /etc/pacman.conf"
  243. alias ngrub="sudo nano /etc/default/grub"
  244. alias nmkinitcpio="sudo nano /etc/mkinitcpio.conf"
  245. alias nslim="sudo nano /etc/slim.conf"
  246. alias noblogout="sudo nano /etc/oblogout.conf"
  247. alias nmirrorlist="sudo nano /etc/pacman.d/mirrorlist"
  248. alias nconfgrub="sudo nano /boot/grub/grub.cfg"
  249.  
  250. #gpg
  251. #verify signature for isos
  252. alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
  253. #receive the key of a developer
  254. alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
  255.  
  256. #shutdown or reboot
  257. alias ssn="sudo shutdown now"
  258. alias sr="sudo reboot"
  259.  
  260. #Poetician Edition
  261. alias cl="clear"
  262.  
  263. # # ex = EXtractor for all kinds of archives
  264. # # usage: ex <file>
  265. ex ()
  266. {
  267. if [ -f $1 ] ; then
  268. case $1 in
  269. *.tar.bz2) tar xjf $1 ;;
  270. *.tar.gz) tar xzf $1 ;;
  271. *.bz2) bunzip2 $1 ;;
  272. *.rar) unrar x $1 ;;
  273. *.gz) gunzip $1 ;;
  274. *.tar) tar xf $1 ;;
  275. *.tbz2) tar xjf $1 ;;
  276. *.tgz) tar xzf $1 ;;
  277. *.zip) unzip $1 ;;
  278. *.Z) uncompress $1;;
  279. *.7z) 7z x $1 ;;
  280. *.deb) ar x $1 ;;
  281. *.tar.xz) tar xf $1 ;;
  282. *) echo "'$1' cannot be extracted via ex()" ;;
  283. esac
  284. else
  285. echo "'$1' is not a valid file"
  286. fi
  287. }
  288.  
  289. #create a file called .zshrc-personal and put all your personal aliases
  290. #in there. They will not be overwritten by skel.
  291.  
  292. [[ -f ~/.zshrc-personal ]] && . ~/.zshrc-personal
  293.  
  294. # neofetch
  295.  
Advertisement
Add Comment
Please, Sign In to add comment