Browse Source

Add mirrorlist update alias

master
Riyyi 4 years ago
parent
commit
593a4ff88c
  1. 3
      .config/zsh/.zshrc
  2. 5
      .scripts/alias.sh

3
.config/zsh/.zshrc

@ -110,7 +110,7 @@ alias vim="vim --servername VIM"
# Config # Config
alias c="$HOME/.scripts/config.sh" alias c="$HOME/.scripts/config.sh"
alias zrc="$EDITOR $ZDOTDIR/.zshrc && source $ZDOTDIR/.zshrc" alias zshrc="$EDITOR $ZDOTDIR/.zshrc && source $ZDOTDIR/.zshrc"
alias lxrdb="xrdb $XDG_CONFIG_HOME/xorg/Xresources" alias lxrdb="xrdb $XDG_CONFIG_HOME/xorg/Xresources"
alias lzshrc="source $ZDOTDIR/.zshrc" alias lzshrc="source $ZDOTDIR/.zshrc"
@ -124,6 +124,7 @@ alias install="sudo pacman -S --needed"
alias remove="sudo pacman -Rns" alias remove="sudo pacman -Rns"
alias search="$HOME/.scripts/alias.sh pacman_search" alias search="$HOME/.scripts/alias.sh pacman_search"
alias update="sudo pacman -Syyu" alias update="sudo pacman -Syyu"
alias update-mirrorlist="$HOME/.scripts/alias.sh update_mirrorlist"
# Programming # Programming
alias jdoc="$HOME/.scripts/alias.sh java_doc" alias jdoc="$HOME/.scripts/alias.sh java_doc"

5
.scripts/alias.sh

@ -93,6 +93,11 @@ stream() {
streamlink --player mpv "https://twitch.tv/$1" "$QUALITY" > /dev/null 2>&1 & streamlink --player mpv "https://twitch.tv/$1" "$QUALITY" > /dev/null 2>&1 &
} }
update_mirrorlist() {
sudo rm /etc/pacman.d/mirrorlist.pacnew
sudo reflector --latest 100 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
}
webmconvert() { webmconvert() {
[ "$2" = "1" ] && AUDIO="-c:a libvorbis" || AUDIO="-an" [ "$2" = "1" ] && AUDIO="-c:a libvorbis" || AUDIO="-an"

Loading…
Cancel
Save