added hyprland-install scripts
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
## Changelogs
|
||||
|
||||
## 01 Fed 2025
|
||||
- added a small scripts in the assets directory to install git and non-git version of hyprland (instruction on the readme)
|
||||
|
||||
## 30 Jan 2025
|
||||
- separate AGS v1 installation separate
|
||||
|
||||
|
||||
@@ -219,6 +219,11 @@ env = WLR_RENDERER_ALLOW_SOFTWARE,1
|
||||
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
|
||||
|
||||
|
||||
#### ➕ Added Hyprland install either git or non-git version
|
||||
- on assets directory of Arch-Hyprland, you will find install scripts to assist in switching non-git and git version of hyprland
|
||||
- pretty straight forward `chmod +x actions.sh` `./actions.sh` and `1 for non-git` and `2 for git version`
|
||||
|
||||
|
||||
#### 📒 Final Notes
|
||||
- join my discord channel [`Discord`](https://discord.com/invite/9JEgZsfhex)
|
||||
- Feel free to copy, re-distribute, and use this script however you want. Would appreciate if you give me some loves by crediting my work :)
|
||||
|
||||
7
assets/hyprland-install/README
Normal file
7
assets/hyprland-install/README
Normal file
@@ -0,0 +1,7 @@
|
||||
Arch-Hyprland - Sharing a scripts to install hyprland git or non-git versions
|
||||
|
||||
Basically created this script so I can easily switch to git and non-git version of hyprland on Arch Linux
|
||||
|
||||
|
||||
chmod +x actions.sh
|
||||
./actions.sh
|
||||
59
assets/hyprland-install/actions.sh
Executable file
59
assets/hyprland-install/actions.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||
|
||||
# Set some colors for output messages
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA=$(tput setaf 5)
|
||||
WARNING=$(tput setaf 1)
|
||||
YELLOW=$(tput setaf 3)
|
||||
BLUE=$(tput setaf 4)
|
||||
RESET=$(tput sgr0)
|
||||
|
||||
|
||||
# Make all scripts in the scripts directory executable
|
||||
echo -e "${INFO} Making all files in the ${BLUE}scripts${RESET} directory executable..."
|
||||
chmod +x ./scripts/*
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
while true; do
|
||||
echo -e "${BLUE} Please choose an option:${RESET}"
|
||||
echo -e "${YELLOW} -- 1 - Install non-git Hyprland version${RESET}"
|
||||
echo -e "${YELLOW} -- 2 - Install git Hyprland version${RESET}"
|
||||
echo -e "${MAGENTA} -- 3 - Quit${RESET}"
|
||||
|
||||
read -p "${CAT} Enter your choice [1, 2, or 3]: " choice
|
||||
|
||||
case $choice in
|
||||
1)
|
||||
printf "\n${OK} You chose non-git version of Hyprland....... executing...\n"
|
||||
echo -e "${YELLOW} Uninstalling some hyprland packages first...${RESET}"
|
||||
./scripts/uninstall.sh
|
||||
echo -e "${NOTE} Installing non-git version of Hyprland...${RESET}\n"
|
||||
./scripts/install-hyprland.sh
|
||||
break
|
||||
;;
|
||||
2)
|
||||
printf "\n${OK} You chose git version of Hyprland....... executing...\n"
|
||||
echo -e "${YELLOW} Uninstalling some hyprland packages....${RESET}"
|
||||
./scripts/uninstall.sh
|
||||
echo -e "${NOTE} Installing git version of Hyprland...${RESET}\n"
|
||||
./scripts/install-hyprland-git.sh
|
||||
break
|
||||
;;
|
||||
3)
|
||||
echo -e "${MAGENTA} You chose to cancel. Good Bye!!...${RESET}"
|
||||
printf "\n%.0s" {1..2}
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "\n${WARNING} There are only 3 Choices!!!! 1 or 2 or 3. Enter 1, 2, or 3.${RESET}"
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
52
assets/hyprland-install/scripts/install-hyprland-git.sh
Executable file
52
assets/hyprland-install/scripts/install-hyprland-git.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||
|
||||
# Set some colors for output messages
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
# List of packages to install / update
|
||||
packages=(
|
||||
"hyprutils-git"
|
||||
"hyprcursor-git"
|
||||
"hyprwayland-scanner-git"
|
||||
"aquamarine-git"
|
||||
"hyprgraphics-git"
|
||||
"hyprlang-git"
|
||||
"hyprland-protocols-git"
|
||||
"hyprland-qt-support-git"
|
||||
"hyprland-qtutils-git"
|
||||
"hyprland-git"
|
||||
"hyprlock-git"
|
||||
"hypridle-git"
|
||||
"xdg-desktop-portal-hyprland-git"
|
||||
"hyprpolkitagent-git"
|
||||
"pyprland"
|
||||
)
|
||||
|
||||
# clearing cache
|
||||
printf "${ACTION} Lets Clear Cache first!!!!"
|
||||
|
||||
sudo pacman -Scc &&
|
||||
$ISAUR -Scc &&
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
$ISAUR -S --noconfirm --needed "$package"
|
||||
done
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
printf "${OK} Done!! Now you NEED to ${YELLOW}EXIT${RESET} Hyprland and Re-Login! Enjoy!!!!"
|
||||
printf "\n%.0s" {1..2}
|
||||
47
assets/hyprland-install/scripts/install-hyprland.sh
Executable file
47
assets/hyprland-install/scripts/install-hyprland.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||
|
||||
# Set some colors for output messages
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
ISAUR=$(command -v yay || command -v paru)
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
|
||||
# List of packages to install / update
|
||||
packages=(
|
||||
"aquamarine"
|
||||
"hyprutils"
|
||||
"hyprcursor"
|
||||
"hyprwayland-scanner"
|
||||
"hyprgraphics"
|
||||
"hyprlang"
|
||||
"hyprland-protocols"
|
||||
"hyprland-qt-support"
|
||||
"hyprland-qtutils"
|
||||
"hyprland"
|
||||
"hyprlock"
|
||||
"hypridle"
|
||||
"xdg-desktop-portal-hyprland"
|
||||
"hyprpolkitagent"
|
||||
"pyprland"
|
||||
)
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
$ISAUR -S --noconfirm --needed "$package"
|
||||
done
|
||||
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
printf "${OK} Done!! Now you NEED to ${YELLOW}EXIT${RESET} Hyprland and Re-Login! Enjoy!!!!"
|
||||
printf "\n%.0s" {1..2}
|
||||
91
assets/hyprland-install/scripts/uninstall.sh
Executable file
91
assets/hyprland-install/scripts/uninstall.sh
Executable file
@@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||
|
||||
# uninstalling hyprland packages
|
||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
WARNING="$(tput setaf 1)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
RESET="$(tput sgr0)"
|
||||
|
||||
|
||||
# List of packages to uninstall (including git versions)
|
||||
packages=(
|
||||
"aquamarine"
|
||||
"aquamarine-git"
|
||||
"hyprutils"
|
||||
"hyprutils-git"
|
||||
"hyprcursor"
|
||||
"hyprcursor-git"
|
||||
"hyprwayland-scanner"
|
||||
"hyprwayland-scanner-git"
|
||||
"hyprgraphics"
|
||||
"hyprgraphics-git"
|
||||
"hyprlang"
|
||||
"hyprlang-git"
|
||||
"hyprland-protocols"
|
||||
"hyprland-protocols-git"
|
||||
"hyprland-qt-support"
|
||||
"hyprland-qt-support-git"
|
||||
"hyprland-qtutils"
|
||||
"hyprland-qtutils-git"
|
||||
"hyprland"
|
||||
"hyprland-git"
|
||||
"hyprlock"
|
||||
"hyprlock-git"
|
||||
"hypridle"
|
||||
"hypridle-git"
|
||||
"xdg-desktop-portal-hyprland"
|
||||
"xdg-desktop-portal-hyprland-git"
|
||||
"hyprpolkitagent"
|
||||
"hyprpolkitagent-git"
|
||||
"pyprland"
|
||||
)
|
||||
|
||||
# Function for uninstall packages
|
||||
uninstall_package() {
|
||||
local pkg="$1"
|
||||
|
||||
if pacman -Qi "$pkg" &>> /dev/null ; then
|
||||
echo -e "${NOTE} Uninstalling $pkg ..."
|
||||
sudo pacman -Rnsdd --noconfirm "$pkg" | grep -v "error: target not found"
|
||||
|
||||
if ! pacman -Qi "$pkg" &>> /dev/null ; then
|
||||
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
|
||||
else
|
||||
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
printf "\n%s - Removing Hyprland Packages including -git versions \n" "${NOTE}"
|
||||
|
||||
# Track failures but continue with next packages
|
||||
overall_failed=0
|
||||
for PKG in "${packages[@]}"; do
|
||||
uninstall_package "$PKG"
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
overall_failed=1
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove specific configuration file since on my experience, it conflicts.
|
||||
# Dont worry, it will be reinstalled by either xdph non-git or git version
|
||||
sudo rm -rf "/usr/share/xdg-desktop-portal/hyprland-portals.conf"
|
||||
|
||||
if [ $overall_failed -eq 0 ]; then
|
||||
echo -e "${OK} All specified hyprland packages have been uninstalled."
|
||||
fi
|
||||
|
||||
printf "\n%.0s" {1..2}
|
||||
Reference in New Issue
Block a user