poetician

i3 ArcoLinux | config.fish

Oct 28th, 2020
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.78 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="linuxonly"
  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 ulk="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. #ps
  155. alias psa="ps auxf"
  156. alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
  157.  
  158. #grub update
  159. alias upgrub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
  160.  
  161. #add new fonts
  162. alias update-fc='sudo fc-cache -fv'
  163.  
  164. #copy/paste all content of /etc/skel over to home folder - backup of config created - beware
  165. alias skel='cp -Rf ~/.config ~/.config-backup-$(date +%Y.%m.%d-%H.%M.%S) && cp -rf /etc/skel/* ~'
  166. #backup contents of /etc/skel to hidden backup folder in home/user
  167. alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)'
  168.  
  169. #copy bashrc-latest over on bashrc - cb= copy bashrc
  170. #alias cb='sudo cp /etc/skel/.bashrc ~/.bashrc && source ~/.bashrc'
  171. #copy /etc/skel/.zshrc over on ~/.zshrc - cb= copy zshrc
  172. alias cz='sudo cp /etc/skel/.zshrc ~/.zshrc && source ~/.zshrc'
  173.  
  174. #switch between bash and zsh
  175. alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
  176. alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
  177.  
  178. #quickly kill conkies
  179. alias kc='killall conky'
  180.  
  181. #hardware info --short
  182. alias hw="hwinfo --short"
  183.  
  184. #skip integrity check
  185. alias yayskip='yay -S --mflags --skipinteg'
  186. alias trizenskip='trizen -S --skipinteg'
  187.  
  188. #check vulnerabilities microcode
  189. alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
  190.  
  191. #get fastest mirrors in your neighborhood
  192. alias mr="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
  193. alias mrd="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
  194. alias mrs="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
  195. alias mra="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
  196.  
  197. #mounting the folder Public for exchange between host and guest on virtualbox
  198. alias vbm="sudo /usr/local/bin/arcolinux-vbox-share"
  199.  
  200. #shopt
  201. #shopt -s autocd # change to named directory
  202. #shopt -s cdspell # autocorrects cd misspellings
  203. #shopt -s cmdhist # save multi-line commands in history as single line
  204. #shopt -s dotglob
  205. #shopt -s histappend # do not overwrite history
  206. #shopt -s expand_aliases # expand aliases
  207.  
  208. #youtube-dl
  209. alias yta-aac="youtube-dl --extract-audio --audio-format aac "
  210. alias yta-best="youtube-dl --extract-audio --audio-format best "
  211. alias yta-flac="youtube-dl --extract-audio --audio-format flac "
  212. alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
  213. alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
  214. alias yta-opus="youtube-dl --extract-audio --audio-format opus "
  215. alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
  216. alias yta-wav="youtube-dl --extract-audio --audio-format wav "
  217.  
  218. alias ytv="youtube-dl -f bestvideo+bestaudio "
  219.  
  220. #Recent Installed Packages
  221. alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
  222. alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl"
  223.  
  224. #iso and version used to install ArcoLinux
  225. alias iso="cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}'"
  226.  
  227. #Cleanup orphaned packages
  228. alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
  229.  
  230. #get the error messages from journalctl
  231. alias jctl="journalctl -p 3 -xb"
  232.  
  233. #nano for important configuration files
  234. #know what you do in these files
  235. alias nlightdm="sudo nano /etc/lightdm/lightdm.conf"
  236. alias npacman="sudo nano /etc/pacman.conf"
  237. alias ngrub="sudo nano /etc/default/grub"
  238. alias nmkinitcpio="sudo nano /etc/mkinitcpio.conf"
  239. alias nslim="sudo nano /etc/slim.conf"
  240. alias noblogout="sudo nano /etc/oblogout.conf"
  241. alias nmirrorlist="sudo nano /etc/pacman.d/mirrorlist"
  242. alias nconfgrub="sudo nano /boot/grub/grub.cfg"
  243. alias bls="betterlockscreen -u /usr/share/backgrounds/arcolinux/"
  244.  
  245. #gpg
  246. #verify signature for isos
  247. alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
  248. #receive the key of a developer
  249. alias gpg-get="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
  250.  
  251. #maintenance
  252. alias big="expac -H M '%m\t%n' | sort -h | nl"
  253. alias downgrada="downgrade --ala-url 'https://bike.seedhost.eu/arcolinux/'"
  254.  
  255. #shutdown or reboot
  256. alias ssn="sudo shutdown now"
  257. alias sr="sudo reboot"
  258.  
  259. #Poetician Edition
  260. alias cl="clear"
  261. alias rs="redshift &"
  262.  
  263. # Aliases for software managment
  264. # pacman or pm
  265. alias pacman='sudo pacman --color auto'
  266. alias up='sudo pacman -Syyu'
  267.  
  268. # yay as aur helper - updates everything
  269. alias pksyua="yay -Syu --noconfirm"
  270. alias all="yay -Syu --noconfirm"
  271.  
  272. # # ex = EXtractor for all kinds of archives
  273. # # usage: ex <file>
  274. ex ()
  275. {
  276. if [ -f $1 ] ; then
  277. case $1 in
  278. *.tar.bz2) tar xjf $1 ;;
  279. *.tar.gz) tar xzf $1 ;;
  280. *.bz2) bunzip2 $1 ;;
  281. *.rar) unrar x $1 ;;
  282. *.gz) gunzip $1 ;;
  283. *.tar) tar xf $1 ;;
  284. *.tbz2) tar xjf $1 ;;
  285. *.tgz) tar xzf $1 ;;
  286. *.zip) unzip $1 ;;
  287. *.Z) uncompress $1;;
  288. *.7z) 7z x $1 ;;
  289. *.deb) ar x $1 ;;
  290. *.tar.xz) tar xf $1 ;;
  291. *.tar.zst) unzstd $1 ;;
  292. *) echo "'$1' cannot be extracted via ex()" ;;
  293. esac
  294. else
  295. echo "'$1' is not a valid file"
  296. fi
  297. }
  298.  
  299. #create a file called .zshrc-personal and put all your personal aliases
  300. #in there. They will not be overwritten by skel.
  301.  
  302. [[ -f ~/.zshrc-personal ]] && . ~/.zshrc-personal
  303.  
  304. # neofetch
  305.  
Advertisement
Add Comment
Please, Sign In to add comment