diff --git a/README.md b/README.md index 5621352..cb00cd4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # hyprland -collection of dot config files for hyprland with a simple install script for a fresh Arch linux with yay -You can grab the config files and install packages by hand with this commnad -``` +Collection of dot config files for [`hyprland`](https://hyprland.org/) with a simple install script for a fresh Arch Linux with [`yay` (or whatever AUR helper you have)](https://wiki.archlinux.org/title/AUR_helpers). + +You can grab the config files and install packages by hand with this command: + +```sh yay -S hyprland-bin kitty waybar-hyprland \ swaybg swaylock-effects wofi wlogout mako thunar \ ttf-jetbrains-mono-nerd noto-fonts-emoji \ diff --git a/set-hypr b/set-hypr index a3ca5b6..bd2afe1 100644 --- a/set-hypr +++ b/set-hypr @@ -34,16 +34,23 @@ # dracula-icons-git" set of icons to go with the Dracula theme # xdg-desktop-portal-hyprland: xdg-desktop-portal backend for hyprland -#### Check for yay #### -ISYAY=/sbin/yay -if [ -f "$ISYAY" ]; then - echo -e "yay was located, moving on.\n" - yay -Suy -else - echo -e "yay was not located, please install yay. Exiting script.\n" - exit +#### Check for AUR helper and do system update #### +get_helper() { + for helper in aurman pacaur pakku paru pikaur trizen yay; do + if command -v "$helper" &>/dev/null; then + echo "$helper" + return + fi + done +} +helper=$(get_helper) +if [ -z "$helper" ]; then + echo "No AUR helper found. Exiting." + exit 1 fi +"$helper" -Syu + ### Disable wifi powersave mode ### read -n1 -rep 'Would you like to disable wifi powersave? (y,n)' WIFI if [[ $WIFI == "Y" || $WIFI == "y" ]]; then @@ -59,7 +66,7 @@ fi ### Install all of the above pacakges #### read -n1 -rep 'Would you like to install the packages? (y,n)' INST if [[ $INST == "Y" || $INST == "y" ]]; then - yay -S --noconfirm hyprland kitty waybar \ + "$helper" -S --noconfirm hyprland kitty waybar \ swaybg swaylock-effects wofi wlogout mako thunar \ ttf-jetbrains-mono-nerd noto-fonts-emoji \ polkit-gnome python-requests starship \ @@ -74,7 +81,7 @@ if [[ $INST == "Y" || $INST == "y" ]]; then # Clean out other portals echo -e "Cleaning out conflicting xdg portals...\n" - yay -R --noconfirm xdg-desktop-portal-gnome xdg-desktop-portal-gtk + "$helper" -R --noconfirm xdg-desktop-portal-gnome xdg-desktop-portal-gtk fi ### Copy Config Files ###