mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
commit
a15ea4ab9b
@ -1,5 +1,8 @@
|
|||||||
## Changelogs
|
## Changelogs
|
||||||
|
|
||||||
|
## 04 Sep 2024
|
||||||
|
- added a function to check if it is Ubuntu or Based on Ubuntu and script will exit
|
||||||
|
|
||||||
## 28 Aug 2024
|
## 28 Aug 2024
|
||||||
- Added final check if hyprland is installed and will give an error to user
|
- Added final check if hyprland is installed and will give an error to user
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
## NOTE: Ubuntu-Hyprland install script are moved to a different Repo
|
## NOTE: Ubuntu-Hyprland install script has its own repo now
|
||||||
- [`Ubuntu-Hyprland LINK`](https://github.com/JaKooLit/Ubuntu-Hyprland)
|
- [`Ubuntu-Hyprland LINK`](https://github.com/JaKooLit/Ubuntu-Hyprland)
|
||||||
- Ubuntu-Hyprland install script on this repo/branch will be deleted by the End Aug 2024
|
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -3,11 +3,10 @@
|
|||||||
# SWWW - Wallpaper Utility #
|
# SWWW - Wallpaper Utility #
|
||||||
|
|
||||||
swww=(
|
swww=(
|
||||||
cargo
|
liblz4-dev
|
||||||
liblz4-dev
|
|
||||||
)
|
)
|
||||||
|
|
||||||
#specific branch or release
|
# specific branch or release
|
||||||
swww_tag="v0.9.5"
|
swww_tag="v0.9.5"
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
@ -28,38 +27,38 @@ MLOG="install-$(date +%d-%H%M%S)_swww2.log"
|
|||||||
printf "\n%s - Installing swww dependencies.... \n" "${NOTE}"
|
printf "\n%s - Installing swww dependencies.... \n" "${NOTE}"
|
||||||
|
|
||||||
for PKG1 in "${swww[@]}"; do
|
for PKG1 in "${swww[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
printf "${NOTE} Force installing packages...\n"
|
||||||
|
for FORCE in "${swww[@]}"; do
|
||||||
|
sudo apt-get --reinstall install -y "$FORCE" 2>&1 | tee -a "$LOG"
|
||||||
|
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $FORCE Package installation failed, Please check the installation logs"; exit 1; }
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n\n"
|
||||||
|
|
||||||
printf "${NOTE} Installing swww\n"
|
printf "${NOTE} Installing swww\n"
|
||||||
|
|
||||||
# Check if swww folder exists
|
# Check if swww folder exists
|
||||||
if [ -d "swww" ]; then
|
if [ -d "swww" ]; then
|
||||||
printf "${NOTE} swww folder exists. Pulling latest changes...\n"
|
printf "${NOTE} swww folder exists. Pulling latest changes...\n"
|
||||||
cd swww || exit 1
|
|
||||||
git pull origin main 2>&1 | tee -a "$MLOG"
|
|
||||||
else
|
|
||||||
printf "${NOTE} Cloning swww repository...\n"
|
|
||||||
if git clone --recursive -b $swww_tag https://github.com/Horus645/swww.git; then
|
|
||||||
cd swww || exit 1
|
cd swww || exit 1
|
||||||
else
|
git pull origin main 2>&1 | tee -a "$MLOG"
|
||||||
echo -e "${ERROR} Download failed for swww" 2>&1 | tee -a "$LOG"
|
else
|
||||||
exit 1
|
printf "${NOTE} Cloning swww repository...\n"
|
||||||
fi
|
if git clone --recursive https://github.com/Horus645/swww.git; then
|
||||||
|
cd swww || exit 1
|
||||||
|
else
|
||||||
|
echo -e "${ERROR} Download failed for swww" 2>&1 | tee -a "$LOG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install new rust
|
|
||||||
# Define environment variables for non-interactive installation
|
|
||||||
export RUSTUP_INIT_SKIP_PATH_CHECK=yes
|
|
||||||
export RUSTUP_INIT_SKIP_CONFIRMATION=yes
|
|
||||||
|
|
||||||
# Download and execute the Rust installer script, automatically answering "yes" to all prompts
|
|
||||||
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path 2>&1 | tee -a "$LOG" || true
|
|
||||||
|
|
||||||
# Proceed with the rest of the installation steps
|
# Proceed with the rest of the installation steps
|
||||||
source "$HOME/.cargo/env" || true
|
source "$HOME/.cargo/env" || true
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# wallust - pywal colors replacment #
|
# wallust - pywal colors replacement #
|
||||||
|
|
||||||
depend=(
|
|
||||||
librust-jpeg-decoder-dev
|
|
||||||
rust
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
@ -16,46 +9,41 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || exit 1
|
||||||
|
|
||||||
|
# Source external functions, adjust path as necessary
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_wallust.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_wallust.log"
|
||||||
MLOG="install-$(date +%d-%H%M%S)_wallust2.log"
|
|
||||||
|
|
||||||
# Installing depencies
|
# Create log directory if it doesn't exist
|
||||||
for PKG1 in "${depend[@]}"; do
|
mkdir -p "$(dirname "$LOG")"
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
##
|
# Install up-to-date Rust
|
||||||
printf "${NOTE} Installing wallust from dev branch...\n"
|
echo "Installing most up to Rust compiler..."
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 2>&1 | tee -a "$LOG"
|
||||||
|
source "$HOME/.cargo/env"
|
||||||
|
|
||||||
# Check if folder exists and remove it
|
printf "\n%.0s" {1..2}
|
||||||
if [ -d "wallust" ]; then
|
|
||||||
printf "${NOTE} Removing existing wallust folder...\n"
|
# Remove any existing Wallust binary
|
||||||
rm -rf "wallust"
|
if [[ -f "/usr/local/bin/wallust" ]]; then
|
||||||
|
echo "Removing existing Wallust binary..." 2>&1 | tee -a "$LOG"
|
||||||
|
sudo rm "/usr/local/bin/wallust"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone and build wallust
|
printf "\n%.0s" {1..2}
|
||||||
printf "${NOTE} Installing wallust...\n"
|
|
||||||
if git clone --depth 1 https://codeberg.org/explosion-mental/wallust.git; then
|
# Install Wallust using Cargo
|
||||||
cd wallust || exit 1
|
echo "Installing Wallust using Cargo..." | tee -a "$LOG"
|
||||||
make
|
if cargo install wallust 2>&1 | tee -a "$LOG" ; then
|
||||||
if sudo make install 2>&1 | tee -a "$MLOG" ; then
|
echo "Wallust installed successfully." | tee -a "$LOG"
|
||||||
printf "${OK} wallust installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
|
||||||
else
|
# Move the newly compiled binary to /usr/local/bin
|
||||||
echo -e "${ERROR} Installation failed for wallust." 2>&1 | tee -a "$MLOG"
|
echo "Moving Wallust binary to /usr/local/bin..." | tee -a "$LOG"
|
||||||
fi
|
sudo mv "$HOME/.cargo/bin/wallust" /usr/local/bin 2>&1 | tee -a "$LOG"
|
||||||
#moving the addional logs to Install-Logs directory
|
|
||||||
mv $MLOG ../Install-Logs/ || true
|
|
||||||
cd ..
|
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Download failed for wallust." 2>&1 | tee -a "$LOG"
|
echo "Error: Wallust installation failed. Check the log file $LOG for details." | tee -a "$LOG"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
|||||||
36
install.sh
36
install.sh
@ -10,28 +10,48 @@ fi
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
printf "\n%.0s" {1..3}
|
# Function to check if the system is Ubuntu
|
||||||
|
is_ubuntu() {
|
||||||
|
# Check for 'Ubuntu' in /etc/os-release
|
||||||
|
if grep -q 'Ubuntu' /etc/os-release; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if the system is Ubuntu
|
||||||
|
if is_ubuntu; then
|
||||||
|
echo "This script is NOT intended for Ubuntu / Ubuntu Based. Please read the README for the correct link."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
# ASCII art
|
||||||
|
printf "\n%.0s" {1..3}
|
||||||
echo " | _. |/ _ _ | o _|_ "
|
echo " | _. |/ _ _ | o _|_ "
|
||||||
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
# Welcome message
|
# Welcome message
|
||||||
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
|
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 166)ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) $(tput sgr0)"
|
echo "$(tput setaf 166)ATTENTION: Run a full system update and reboot first!! (Highly Recommended)$(tput sgr0)"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation! $(tput sgr0)"
|
echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation!$(tput sgr0)"
|
||||||
echo
|
echo
|
||||||
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)"
|
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration; otherwise, Hyprland won't start!$(tput sgr0)"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# Prompt user to proceed
|
||||||
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
||||||
|
|
||||||
if [ "$proceed" != "y" ]; then
|
if [[ "$proceed" != "y" ]]; then
|
||||||
echo "Installation aborted."
|
echo "Installation aborted."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
|
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
|
||||||
|
|
||||||
if [ "$proceed2" != "y" ]; then
|
if [ "$proceed2" != "y" ]; then
|
||||||
@ -161,10 +181,10 @@ execute_script "01-pre-cleanup.sh"
|
|||||||
execute_script "00-dependencies.sh"
|
execute_script "00-dependencies.sh"
|
||||||
execute_script "00-hypr-pkgs.sh"
|
execute_script "00-hypr-pkgs.sh"
|
||||||
execute_script "fonts.sh"
|
execute_script "fonts.sh"
|
||||||
|
execute_script "wallust.sh"
|
||||||
execute_script "imagemagick.sh"
|
execute_script "imagemagick.sh"
|
||||||
execute_script "swww.sh"
|
execute_script "swww.sh"
|
||||||
execute_script "rofi-wayland.sh"
|
execute_script "rofi-wayland.sh"
|
||||||
execute_script "wallust.sh"
|
|
||||||
execute_script "ags.sh"
|
execute_script "ags.sh"
|
||||||
execute_script "hyprland.sh"
|
execute_script "hyprland.sh"
|
||||||
execute_script "hyprlock.sh"
|
execute_script "hyprlock.sh"
|
||||||
@ -245,7 +265,7 @@ if dpkg -l | grep -qw hyprland || dpkg -l | grep -qw hyprland-git; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Print error message if neither package is installed
|
# Print error message if neither package is installed
|
||||||
printf "\n${NOTE} Hyprland failed to install. Please check Install-Logs...\n\n"
|
printf "\n${WARN} Hyprland failed to install. Please check Install-Logs...\n\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user