Advertisement
poetician

ArcoLinux Awesome .bashrc

Sep 22nd, 2019
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. #
  2. # ~/.bashrc
  3. #
  4.  
  5. #Ibus settings if you need them
  6. #type ibus-setup in terminal to change settings and start the daemon
  7. #delete the hashtags of the next lines and restart
  8. #export GTK_IM_MODULE=ibus
  9. #export XMODIFIERS=@im=dbus
  10. #export QT_IM_MODULE=ibus
  11.  
  12. # If not running interactively, don't do anything
  13. [[ $- != *i* ]] && return
  14.  
  15. export HISTCONTROL=ignoreboth:erasedups
  16.  
  17. PS1='[\u@\h \W]\$ '
  18.  
  19. if [ -d "$HOME/.bin" ] ;
  20. then PATH="$HOME/.bin:$PATH"
  21. fi
  22.  
  23. #list
  24. alias ls='ls --color=auto'
  25. alias la='ls -a'
  26. alias ll='ls -la'
  27. alias l='ls'
  28. alias l.="ls -A | egrep '^\.'"
  29.  
  30. #fix obvious typo's
  31. alias cd..='cd ..'
  32. alias pdw="pwd"
  33. alias udpate='sudo pacman -Syyu'
  34.  
  35. ## Colorize the grep command output for ease of use (good for log files)##
  36. alias grep='grep --color=auto'
  37. alias egrep='egrep --color=auto'
  38. alias fgrep='fgrep --color=auto'
  39.  
  40. #readable output
  41. alias df='df -h'
  42.  
  43. #pacman unlock
  44. alias unlock="sudo rm /var/lib/pacman/db.lck"
  45.  
  46. #free
  47. alias free="free -mt"
  48.  
  49. #use all cores
  50. alias uac="sh ~/.bin/main/000*"
  51.  
  52. #continue download
  53. alias wget="wget -c"
  54.  
  55. #userlist
  56. alias userlist="cut -d: -f1 /etc/passwd"
  57.  
  58. #merge new settings
  59. alias merge="xrdb -merge ~/.Xresources"
  60.  
  61. # Aliases for software managment
  62. # pacman or pm
  63. alias pacman='sudo pacman --color auto'
  64. alias update='sudo pacman -Syyu'
  65.  
  66. # yay as aur helper - updates everything
  67. alias pksyua="yay -Syu --noconfirm"
  68.  
  69. #ps
  70. alias ps="ps auxf"
  71. alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
  72.  
  73. #grub update
  74. alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
  75.  
  76. #improve png
  77. alias fixpng="find . -type f -name "*.png" -exec convert {} -strip {} \;"
  78.  
  79. #add new fonts
  80. alias fc='sudo fc-cache -fv'
  81.  
  82. #copy/paste all content of /etc/skel over to home folder - Beware
  83. alias skel='cp -rf /etc/skel/* ~'
  84. #backup contents of /etc/skel to hidden backup folder in home/user
  85. alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)'
  86.  
  87. #copy bashrc-latest over on bashrc - cb= copy bashrc
  88. alias cb="cp ~/.bashrc-latest ~/.bashrc && source ~/.bashrc && sudo cp /etc/skel/.bashrc-latest /etc/skel/.bashrc"
  89.  
  90. #quickly kill conkies
  91. alias kc='killall conky'
  92.  
  93. #hardware info --short
  94. alias hw="hwinfo --short"
  95.  
  96. #skip integrity check
  97. alias yayskip='yay -S --mflags --skipinteg'
  98. alias trizenskip='trizen -S --skipinteg'
  99.  
  100. #check vulnerabilities microcode
  101. alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
  102.  
  103. #get fastest mirrors in your neighborhood
  104. alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
  105. alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
  106. alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
  107. alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
  108.  
  109. #mounting the folder Public for exchange between host and guest on virtualbox
  110. alias vbm="sudo mount -t vboxsf -o rw,uid=1000,gid=1000 Public /home/$USER/Public"
  111.  
  112. #shopt
  113. shopt -s autocd # change to named directory
  114. shopt -s cdspell # autocorrects cd misspellings
  115. shopt -s cmdhist # save multi-line commands in history as single line
  116. shopt -s dotglob
  117. shopt -s histappend # do not overwrite history
  118. shopt -s expand_aliases # expand aliases
  119.  
  120. #youtube-dl
  121. alias yta-aac="youtube-dl --extract-audio --audio-format aac "
  122. alias yta-best="youtube-dl --extract-audio --audio-format best "
  123. alias yta-flac="youtube-dl --extract-audio --audio-format flac "
  124. alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
  125. alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
  126. alias yta-opus="youtube-dl --extract-audio --audio-format opus "
  127. alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
  128. alias yta-wav="youtube-dl --extract-audio --audio-format wav "
  129.  
  130. alias ytv-best="youtube-dl -f bestvideo+bestaudio "
  131.  
  132. #Recent Installed Packages
  133. alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -100"
  134.  
  135. #Cleanup orphaned packages
  136. alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
  137.  
  138. #get the error messages from journalctl
  139. alias jctl="journalctl -p 3 -xb"
  140.  
  141. #create a file called .bashrc-personal and put all your personal aliases
  142. #in there. They will not be overwritten by skel.
  143.  
  144. [[ -f ~/.bashrc-personal ]] && . ~/.bashrc-personal
  145.  
  146. function _update_ps1() {
  147. PS1=$(powerline-shell $?)
  148. }
  149.  
  150. if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
  151. PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
  152. fi
  153.  
  154. clear
  155. figlet -f doom "Prepare The Mind" | lolcat -d 20
  156. neofetch
  157. "echo" ----- With great power comes great responsibility ----- | lolcat -d 20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement