dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[FEATURE] Custom AUR Helper

Open 0blivi0nis opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. Yes, currently the available options are yay and paru only. I prefer pikaur since I can edit PKGFILES before installing and also since I understand python. This forces me to install either yay or paru just for the hyprland setup to work properly leaving me with additional packages, or as i see it as bloat.

Describe the solution you'd like I have a solution already available since i use this function in my own dotfiles scripts.

aur_helper() { AUR_HELPER=$(gum choose --cursor "[ • ] " --cursor-prefix "[ • ] " --selected-prefix "[ ✓ ] " --unselected-prefix "[ ] " "paru" "yay" "pikaur" "trizen" "aurman" "pacaur" "pakku") echo -e "Installing $green$ITALICS$AUR_HELPER"$NORMAL cd ~ git clone "https://aur.archlinux.org/$AUR_HELPER.git" cd ~/$AUR_HELPER makepkg -si --noconfirm cd ~ rm -rf $AUR_HELPER echo -e $green$ITALICS"$AUR_HELPER$NORMAL Installed." }

When this function is called, a gum choose command is run with the available options, in this case, most of the ones listed on the Arch Wiki and turn the answer of that command to the variable AUR_HELPER. The rest is pretty straight forward and it also cleans up after itself by deleting the cloned folder.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context I suggest keeping the the checks for yay and paru and only modify the script where it asks to install a helper when there isnt one.

0blivi0nis avatar Sep 24 '24 07:09 0blivi0nis

@0blivi0nis This is definitely a valuable feedback and a good suggestion. I will look into your proposal as soon as possible.

mylinuxforwork avatar Sep 24 '24 07:09 mylinuxforwork

I have included this in my ZEN ZSH pull request

0blivi0nis avatar Sep 29 '24 08:09 0blivi0nis

https://github.com/mylinuxforwork/dotfiles/pull/269

mylinuxforwork avatar Oct 05 '24 08:10 mylinuxforwork

I will focus on yay and paru

mylinuxforwork avatar Jan 31 '25 21:01 mylinuxforwork