mylinuxforwork / dotfiles

The ML4W Dotfiles for Hyprland - An advanced and full-featured configuration for the dynamic tiling window manager Hyprland including an easy to use installation script for Arch based Linux distributions.
GNU General Public License v3.0
1.1k stars 85 forks source link

[FEATURE] Custom AUR Helper #265

Open 0blivi0nis opened 1 month ago

0blivi0nis commented 1 month ago

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.

mylinuxforwork commented 1 month ago

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

0blivi0nis commented 1 month ago

I have included this in my ZEN ZSH pull request

mylinuxforwork commented 1 month ago

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