diff --git a/base/arch-desktop/_init b/base/arch-desktop/_init index 8e3f7b65..72024522 100755 --- a/base/arch-desktop/_init +++ b/base/arch-desktop/_init @@ -8,12 +8,12 @@ install() { elif ! sudo pacman -Syu --noconfirm; then >&2 echo "Could not update pacman" return 2 - elif ! _is_callable pacaur; then + elif ! _is_callable yay; then >&2 echo "Could not find pacaur" return 3 fi - pacaur --needed --noconfirm --noedit -S \ + yay --needed --noconfirm -S \ xorg-server xorg-xrandr xorg-xinit xorg-xlsfonts xorg-xfd xdotool \ lightdm lightdm-mini-greeter \ bspwm sxhkd compton dunst xcb-proto polybar libnotify \ diff --git a/base/arch-desktop/config/polybar/modules/updates b/base/arch-desktop/config/polybar/modules/updates index 0af0a3f9..f3420fec 100755 --- a/base/arch-desktop/config/polybar/modules/updates +++ b/base/arch-desktop/config/polybar/modules/updates @@ -5,8 +5,8 @@ if [[ $1 == "1" ]]; then exit fi -pac=$(checkupdates | wc -l) -aur=$(cower -u | wc -l) +pac=$(checkupdates 2>/dev/null | wc -l) +aur=$(yay -Pn 2>/dev/null) [[ -f /tmp/polybar-updates ]] && last=$(/dev/null; then fi set -e -pacaur --needed --noconfirm --noedit -S ninja cmake libxcursor +yay --needed --noconfirm -S ninja cmake libxcursor rm -rf /tmp/aseprite if git clone --recursive https://github.com/aseprite/aseprite /tmp/aseprite; then mkdir /tmp/aseprite/build && cd /tmp/aseprite/build cmake -DCMAKE_INSTALL_PREFIX=/usr -G Ninja .. ninja aseprite ninja install -fi \ No newline at end of file +fi diff --git a/base/arch/_init b/base/arch/_init index 6c07886a..d0ff4df6 100755 --- a/base/arch/_init +++ b/base/arch/_init @@ -13,31 +13,26 @@ install() { # Core essentials sudo pacman --needed --noconfirm -S wget git curl tree rsync dnsutils - # Set up pacaur (AUR helper) - if ! _is_callable pacaur; then - TEMP="$(mktemp -d)" - pushd $TEMP - for pkg in cower pacaur; do - if [[ ! "$(pacman -Qs $pkg)" ]]; then - curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=$pkg && \ - makepkg PKGBUILD --needed --noconfirm --skippgpcheck -sri - fi - done + # Set up yay (AUR helper) + if ! _is_callable yay; then + git clone https://aur.archlinux.org/yay.git /tmp/yay + pushd /tmp/yay + makepkg -si popd - rm -rf $TEMP + rm -rf /tmp/yay - if ! _is_callable pacaur; then - >&2 echo "Pacaur was not successfully installed" + if ! _is_callable yay; then + >&2 echo "Yay was not successfully installed" return 3 fi fi - pacaur --needed --noconfirm --noedit -S ripgrep the_silver_searcher bc cronie + yay --needed --noconfirm -S ripgrep the_silver_searcher bc cronie sudo systemctl enable cronie } update() { - _is_callable pacaur && local pac=pacaur + _is_callable yay && local pac=yay ${pac:-sudo pacman} -Syu --noconfirm } diff --git a/base/arch/aliases.zsh b/base/arch/aliases.zsh index 0a8a12de..698c19bd 100644 --- a/base/arch/aliases.zsh +++ b/base/arch/aliases.zsh @@ -6,10 +6,8 @@ alias jc=journalctl alias ssc='sudo systemctl' alias ufw='sudo ufw' -alias pac=pacaur -alias pacu='pacaur -Syu' # upgrade -alias pacc='pacaur -Sc' # clean pacman -alias paco='pacaur -Qtdq' # orphaned packages +alias yayc='yay -Sc' # clean pacman +alias yayo='yay -Qtdq' # orphaned packages alias reboot='sudo systemctl reboot' alias shutdown='sudo systemctl poweroff' diff --git a/dev/cc/_init b/dev/cc/_init index 75176e76..af457637 100755 --- a/dev/cc/_init +++ b/dev/cc/_init @@ -8,7 +8,7 @@ install() { brew install cmake bear gdb echo "Note: gdb requires additional setup on MacOS, see https://sourceware.org/gdb/wiki/BuildingOnDarwin" ;; - arch) pacaur --needed --noconfirm -S cmake bear gdb ;; + arch) yay --needed --noconfirm -S cmake bear gdb ;; esac } diff --git a/dev/go/_init b/dev/go/_init index 382f9809..71af9322 100755 --- a/dev/go/_init +++ b/dev/go/_init @@ -5,7 +5,7 @@ source env.zsh install() { case $(_os) in macos) brew install go ;; - arch) pacaur --needed --noconfirm -S go ;; + arch) yay --needed --noconfirm -S go ;; esac update diff --git a/dev/haskell/_init b/dev/haskell/_init index 850621ab..f8e930e2 100755 --- a/dev/haskell/_init +++ b/dev/haskell/_init @@ -8,7 +8,7 @@ install() { # The arch linux + haskell situation is a mess. To ensure haskell packages # installed via pacman and ones installed via stack/cabal leave each other # alone, we need ghc-static + stack-bin. - arch) pacaur --needed --noedit --noconfirm -S ghc-static stack-bin ;; + arch) yay --needed --noconfirm -S ghc-static stack-bin ;; esac stack config set system-ghc --global true stack setup && stack install ShellCheck diff --git a/dev/java/_init b/dev/java/_init index 640c3203..0ee865eb 100755 --- a/dev/java/_init +++ b/dev/java/_init @@ -6,7 +6,7 @@ install() { # TODO Install android SDK case $(_os) in macos) brew cask install java gradle ;; - arch) pacaur --needed --noedit --noconfirm -S jdk8-openjdk gradle ;; + arch) yay --needed --noconfirm -S jdk8-openjdk gradle ;; esac } diff --git a/dev/php/_init b/dev/php/_init index a1bba52f..4eea65da 100755 --- a/dev/php/_init +++ b/dev/php/_init @@ -6,7 +6,7 @@ install() { _ensure_repo madumlao/phpenv $PHPENV_ROOT _ensure_repo php-build/php-build $PHPENV_ROOT/plugins/php-build case $(_os) in - arch) pacaur --needed --noconfirm --noedit -S libmcrypt tidy ;; + arch) yay --needed --noconfirm -S libmcrypt tidy ;; macos) brew install libmcrypt tidy-html5 ;; esac } diff --git a/dev/rust/_init b/dev/rust/_init index 59c66431..b105276b 100755 --- a/dev/rust/_init +++ b/dev/rust/_init @@ -5,7 +5,7 @@ source env.zsh install() { case $(_os) in macos) brew install rustup ;; - arch) pacaur --needed --noconfirm -S rustup ;; + arch) yay --needed --noconfirm -S rustup ;; esac rustup install stable rustup component add rust-src diff --git a/editor/editorconfig/_init b/editor/editorconfig/_init index 03d21a21..c358ef64 100755 --- a/editor/editorconfig/_init +++ b/editor/editorconfig/_init @@ -4,7 +4,7 @@ source ${0:A:h}/../../deploy install() { case $(_os) in macos) brew install editorconfig ;; - arch) pacaur --noedit --needed --noconfirm -S editorconfig-core-c ;; + arch) yay --needed --noconfirm -S editorconfig-core-c ;; debian) sudo apt-get install -y editorconfig ;; esac } diff --git a/editor/emacs/_init b/editor/emacs/_init index c46e008a..cf6bc2c7 100755 --- a/editor/emacs/_init +++ b/editor/emacs/_init @@ -6,7 +6,7 @@ install() { macos) brew tap d12frosted/emacs-plus brew install emacs-plus --without-spacemacs-icon ;; - arch) pacaur --needed --noconfirm --noedit -S make emacs ;; + arch) yay --needed --noconfirm -S make emacs ;; debian) sudo apt-get install -y make emacs ;; esac diff --git a/editor/neovim/_init b/editor/neovim/_init index 20153290..0980090e 100755 --- a/editor/neovim/_init +++ b/editor/neovim/_init @@ -6,7 +6,7 @@ NVIM_INSTALL_DIR="$XDG_CONFIG_HOME/nvim" install() { case $(_os) in macos) _is_callable nvim || brew install neovim ;; - arch) pacaur --needed --noconfirm --noedit -S make neovim python-neovim ;; + arch) yay --needed --noconfirm -S make neovim python-neovim ;; debian) sudo add-apt-repository ppa:neovim-ppa/unstable sudo apt-get install -y neovim diff --git a/editor/vim/_init b/editor/vim/_init index 36f018c9..db7be868 100755 --- a/editor/vim/_init +++ b/editor/vim/_init @@ -6,7 +6,7 @@ VIM_INSTALL_DIR="$XDG_CONFIG_HOME/vim" install() { case $(_os) in macos) _is_callable vim || brew install vim ;; - arch) pacaur --needed --noconfirm --noedit -S vim ;; + arch) yay --needed --noconfirm -S vim ;; debian) sudo apt-get install -y vim ;; esac diff --git a/misc/qutebrowser/_init b/misc/qutebrowser/_init index e9dd79f3..a188ee0a 100755 --- a/misc/qutebrowser/_init +++ b/misc/qutebrowser/_init @@ -6,7 +6,7 @@ QUTEBROWSER_HOME=$XDG_CONFIG_HOME/qutebrowser install() { case $(_os) in macos) brew cask install qutebrowser ;; - arch) pacaur --needed --noconfirm --noedit -S qutebrowser ;; + arch) yay --needed --noconfirm -S qutebrowser ;; esac } diff --git a/shell/git/_init b/shell/git/_init index bb88584f..6500ad34 100755 --- a/shell/git/_init +++ b/shell/git/_init @@ -6,7 +6,7 @@ install() { case $(_os) in macos) brew install git git-lfs hub diff-so-fancy git-standup git-extras git-flow-avh ;; arch) - pacaur --needed --noconfirm --noedit -S git hub \ + yay --needed --noconfirm -S git hub \ git-lfs diff-so-fancy git-standup-git git-extras \ gitflow-avh ;; debian) diff --git a/shell/mu/_init b/shell/mu/_init index 49f38214..9a31049c 100755 --- a/shell/mu/_init +++ b/shell/mu/_init @@ -9,7 +9,7 @@ install() { ;; linux*) if [[ -f /etc/arch-release ]]; then - pacaur --noedit --needed --noconfirm -S offlineimap mu + yay --needed --noconfirm -S offlineimap mu fi ;; esac diff --git a/shell/sk/_init b/shell/sk/_init index 4048e84d..5231aaca 100755 --- a/shell/sk/_init +++ b/shell/sk/_init @@ -4,7 +4,7 @@ source ${0:A:h}/../../deploy install() { case $(_os) in macos) brew install sbdchd/skim/skim ;; - arch) pacaur --needed --noconfirm -S skim ;; + arch) yay --needed --noconfirm -S skim ;; debian) sudo apt-get install -y skim ;; esac }