Skip to content

Commit

Permalink
Merge pull request #56 from JaKooLit/development
Browse files Browse the repository at this point in the history
Debian-Hyprland updated to Hyprland v0.39.1
  • Loading branch information
JaKooLit authored Apr 30, 2024
2 parents 9696c47 + 359bbe8 commit c19b76f
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 121 deletions.
5 changes: 4 additions & 1 deletion CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## Changelogs

## 30 Apr 2024
- Updated hyprland.sh to install v0.34.0 Hyprland
- Updated hyprland.sh to install v0.39.1 Hyprland
- adding hypridle and hyprlock
- dropping swaylock-effects and swayidle
- adjusted to work with current Hyprland-Dots

## 22 Apr 2024
- Change dotfiles to specific version only as Debian and Ubuntu cant keep up with Hyprland development
Expand Down
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<div align="center">

## 💌 JaKooLit's Debian/Ubuntu Hyprland Install Script 💌
#### For Debian 13 Trixie and SID and Ubuntu 23.10 Mantic Minotaur or newer
#### For Debian 13 Trixie and SID and Ubuntu 24.04 Noble Numbat

![GitHub Repo stars](https://img.shields.io/github/stars/JaKooLit/Debian-Hyprland?style=for-the-badge&color=cba6f7) ![GitHub last commit](https://img.shields.io/github/last-commit/JaKooLit/Debian-Hyprland?style=for-the-badge&color=b4befe) ![GitHub repo size](https://img.shields.io/github/repo-size/JaKooLit/Debian-Hyprland?style=for-the-badge&color=cba6f7)

<br/>
</div>

### ♨️♨️♨️ ATTENTION ♨️♨️♨️ 30 Apr 2024
- Due to fast development of Hyprland and most up to date requirement of hyprland, Hyprland version to be installed by this script will be older version. For now, the hyprland version to be installed with this script is v0.34.0

### ♨️♨️♨️ ATTENTION ♨️♨️♨️ 22 Apr 2024
- Pre-configured dotfiles to be downloaded here will be v2.2.6 only
- [`Hyprland-Dots v2.2.6`](https://github.com/JaKooLit/Hyprland-Dots/releases/tag/v2.2.6)
- This is because Debian/Ubuntu are very slow with Hyprland Development
- This script will not work on older build of Ubuntu like Ubuntu 23.10 and older. Due to depencies. If you want to install on Ubuntu 23.10, you can download the version v2.2.3 from the releases

> [!IMPORTANT]
> install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script. This script does NOT include uninstallation of packages
Expand Down Expand Up @@ -42,11 +37,10 @@ sudo nano /etc/apt/sources.list
> For Ubuntu 24.04 LTS, no need to edit the /etc/apt/sources.list
> [!IMPORTANT]
> UBUNTU USERS: You can use this installer. However, I have only tested on Ubuntu 23.10. Not sure if it works on older ubuntu as Hyprland needs an updated wayland libraries. For sure wont work in any Ubuntu LTS.
> UBUNTU USERS: Will only work on Ubuntu 24.04. See above!
> If you are using Gnome already, DO NOT install the SDDM. The GDM works file as well. For some reason, during installation, you will be asked which login manager you wanted to use. But during my test, nothing happened.
> Ubuntu 23.10 dont have cliphist (used as clipboard manager) in their repo yet! And it is not set to build by default. If you want script to install for you, edit `install-scripts/00-hypr-pks.sh` line 15 remove the cliphist under hypr_package . then edit `install.sh` line 175 remove # in `#execute_script "cliphist.sh"`

> [!CAUTION]
> For Ubuntu with NVIDIA GPU's, make sure to edit the install-scripts/nvidia.sh . Delete all packages in nvidia_pkg except libva-wayland2 and nvidia-vaapi-driver and uncomment/remove # before sudo ubuntu-drivers install. You also need to delete or simply just add # in the lines 37 and 38 echo "echo "## for nvidia" | sudo tee -a... and echo "deb http://deb.debian.org/debian........
Expand All @@ -56,15 +50,14 @@ sudo nano /etc/apt/sources.list
> If you have GDM already as log-in manager, DO NOT install SDDM
> You will encounter issues. See [`Issue 2 - SDDM`](https://github.com/JaKooLit/Debian-Hyprland/issues/2)

#### 📷 Gallery
<p align="center">
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-ScreenShots/Debian-v2/Debian.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-ScreenShots/Debian-v2/Waybar-Layouts.png" />
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Distro-Hyprland/Debian/debian.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Distro-Hyprland/Debian/debian2.png" />
</p>

<p align="center">
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/default-waybar.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/rofi.png" />
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/wlogout-dark.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/showcase2.png"" />
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/default-waybar.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Distro-Hyprland/Debian/debian4.png" />
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/wlogout-dark.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Distro-Hyprland/Debian/hyprlock.png"" />
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/waybar-layout.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/waybar-style.png"" />
</p>

Expand Down Expand Up @@ -120,7 +113,7 @@ sudo nano /etc/apt/sources.list
> [!IMPORTANT]
> If you want to use nouveau driver, choose N when asked if you have nvidia gpu. This is because the nvidia installer part, it will blacklist nouveau. Hyprland will still be installed but it will skip blacklisting nouveau.
#### ✨ to run
# ✨ to run or Use this script
> clone this repo (latest commit only) by using git. Change directory, make executable and run the script
```bash
git clone --depth=1 https://github.com/JaKooLit/Debian-Hyprland.git ~/Debian-Hyprland
Expand All @@ -139,12 +132,10 @@ zsh
source ~/.zshrc
```
- reboot or logout
- by default agnoster theme is installed. You can find more themes from this [`OH-MY-ZSH-THEMES`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
- by default `xiong-chiamiov-plus` theme is installed. You can find more themes from this [`OH-MY-ZSH-THEMES`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
- to change the theme, edit ~/.zshrc ZSH_THEME="desired theme"

#### ✨ TO DO once installation done and dotfiles copied
- ~~if you opted to install gtk themes, to apply the theme and icon, press the dark/light button (beside the padlock). To apply Bibata modern ice cursor, launch nwg-look (GTK Settings) through rofi.~~ Hyprland-Dots v2.1.18, initial boot file will attempt to apply GTK themes,cursor, and icons. You can tweak more using nwg-look (GTK-Settings) utility

- SUPER H for HINT or click on the waybar HINT! Button
- Head over to [FAQ](https://github.com/JaKooLit/Hyprland-Dots/wiki/FAQ) and [TIPS](https://github.com/JaKooLit/Hyprland-Dots/wiki/TIPS)

Expand All @@ -156,7 +147,10 @@ source ~/.zshrc
- nwg-look [`LINK`](https://github.com/nwg-piotr/nwg-look)
- Asus ROG asusctl [`LINK`](https://gitlab.com/asus-linux/asusctl) and superfxctl [`LINK`](https://gitlab.com/asus-linux/supergfxctl)
- swww [`LINK`](https://github.com/Horus645/swww)
- swaylock-effects [`LINK`](https://github.com/mortie/swaylock-effects)
- hyprlock [`LINK`](https://github.com/hyprwm/hyprlock)
- hypridle [`LINK`](https://github.com/hyprwm/hypridle)
- hyprlang [`LINK`](https://github.com/hyprwm/hyprlang)
- hyprcursor [`LINK`](https://github.com/hyprwm/hyprcursor)
- swappy [`LINK`](https://github.com/jtheoof/swappy)
- xdg-desktop-portal-hyprland [`LINK`](https://github.com/hyprwm/xdg-desktop-portal-hyprland)
- rofi-wayland [`LINK`](https://github.com/lbonn/rofi)
Expand All @@ -167,6 +161,9 @@ source ~/.zshrc
#### Most common question I got is, Hey Ja, Why the heck it is taking long time to install? Other distro like Arch its only a minute or two. Why here takes like forever?!?!?!
- Well, most of the core packages are downloaded and Build and compiled from SOURCE. There are no pre-built binary (yet) for Debian and Ubuntu. Unlike Other distros, they already have prepacked binary that can just download and install.

> [!NOTE]
> This script does not setup audio. Kindly set up. If you have not, I recommend pipewire. `sudo apt install -y pipewire`
#### ❗ some known issues on this Installer
- some users reported that they have to install some packages. It is in the install-scripts/force-install.sh
- At this time the packages force to install are the following `imagemagick`
Expand All @@ -182,11 +179,10 @@ source ~/.zshrc
- for the Pre-configured Hyprland dots / configuration, submit issue [`here`](https://github.com/JaKooLit/Hyprland-Dots/issues)

#### 🔧 Proper way to re-installing a particular script from install-scripts folder
- CD into Fedora-Hyprland Folder and then ran the below command.
- CD into Debian-Hyprland Folder and then ran the below command.
- i.e. `./install-scripts/gtk-themes` - For reinstall GTK Themes.

#### 🛣️ Roadmap:
- ~~[ ] Install zsh and oh-my-zsh without necessary steps above~~ DONE
- [ ] possibly adding gruvbox themes, cursors, icons

#### ❗ some known issues for nvidia
Expand All @@ -204,7 +200,7 @@ log into your account
- more info from the hyprland wiki [`Hyprland Wiki Link`](https://wiki.hyprland.org/FAQ/#my-external-monitor-is-blank--doesnt-render--receives-no-signal-laptop)


- [ ] Does not work in Ubuntu 23.04
- [ ] Does not work in Ubuntu 23.10 and older
- [ ] sddm blackscreen when log-out
- [ ] Installing SDDM if or any other Login Manager installed. See [`Issue 2 - SDDM`](https://github.com/JaKooLit/Debian-Hyprland/issues/2)
- [ ] network is down or become unmanaged [`This`](https://askubuntu.com/questions/71159/network-manager-says-device-not-managed) might help
Expand Down
1 change: 0 additions & 1 deletion install-scripts/00-hypr-pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ hypr_package_2=(
mpv-mpris
nvtop
pamixer
swayidle
vim
)

Expand Down
89 changes: 62 additions & 27 deletions install-scripts/dotfiles.sh
Original file line number Diff line number Diff line change
@@ -1,51 +1,86 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Hyprland-Dots to download a specific release #

# Define the specific release version to download
specific_version="v2.2.6"
# Hyprland-Dots to download from Releases #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi

## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##

source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"

printf "${NOTE} Downloading / Checking for existing Hyprland-Dots-${specific_version}.tar.gz...\n"

# Check if the specific release tarball exists
if [ -f "Hyprland-Dots-${specific_version}.tar.gz" ]; then
printf "${NOTE} Hyprland-Dots-${specific_version}.tar.gz found.\n"
echo -e "${OK} Hyprland-Dots-${specific_version}.tar.gz is already downloaded."
exit 0
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots.tar.gz...\n"

# Check if Hyprland-Dots.tar.gz exists
if [ -f Hyprland-Dots.tar.gz ]; then
printf "${NOTE} Hyprland-Dots.tar.gz found.\n"

# Get the version from the existing tarball filename
existing_version=$(echo Hyprland-Dots.tar.gz | grep -oP 'v\d+\.\d+\.\d+' | sed 's/v//')

# Fetch the tag_name for the latest release using the GitHub API
latest_version=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4 | sed 's/v//')

# Check if versions match
if [ "$existing_version" = "$latest_version" ]; then
echo -e "${OK} Hyprland-Dots.tar.gz is up-to-date with the latest release ($latest_version)."

# Sleep for 10 seconds before exiting
printf "${NOTE} No update found. Sleeping for 10 seconds...\n"
sleep 10
exit 0
else
echo -e "${WARN} Hyprland-Dots.tar.gz is outdated (Existing version: $existing_version, Latest version: $latest_version)."
if [[ -z $upgrade_choice ]]; then
read -p "Do you want to upgrade to the latest version? (y/n): " upgrade_choice
fi
if [ "$upgrade_choice" = "y" ]; then
echo -e "${NOTE} Proceeding to download the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"

# Delete existing directories starting with JaKooLit-Hyprland-Dots
find . -type d -name 'JaKooLit-Hyprland-Dots*' -exec rm -rf {} +
rm -f Hyprland-Dots.tar.gz
printf "${WARN} Removed existing Hyprland-Dots.tar.gz.\n"
else
echo -e "${NOTE} User chose not to upgrade. Exiting..." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 0
fi
fi
fi

printf "${NOTE} Downloading the Hyprland-Dots-${specific_version} source code release...\n"
printf "${NOTE} Downloading the latest Hyprland source code release...\n"

# Fetch the tag name for the specific release using the GitHub API
release_info=$(curl -s "https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/tags/${specific_version}")
if [ -z "$release_info" ]; then
echo -e "${ERROR} Unable to fetch information for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
# Fetch the tag name for the latest release using the GitHub API
latest_tag=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4)

# Check if the tag is obtained successfully
if [ -z "$latest_tag" ]; then
echo -e "${ERROR} Unable to fetch the latest tag information." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi

# Get the tarball URL for the specific release
tarball_url=$(echo "$release_info" | grep "tarball_url" | cut -d '"' -f 4)
# Fetch the tarball URL for the latest release using the GitHub API
latest_tarball_url=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tarball_url" | cut -d '"' -f 4)

# Check if the URL is obtained successfully
if [ -z "$tarball_url" ]; then
echo -e "${ERROR} Unable to fetch the tarball URL for release ${specific_version}." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
if [ -z "$latest_tarball_url" ]; then
echo -e "${ERROR} Unable to fetch the tarball URL for the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi

# Download the specific release source code tarball to the current directory
if curl -L "$tarball_url" -o "Hyprland-Dots-${specific_version}.tar.gz"; then
# Get the filename from the URL and include the tag name in the file name
file_name="Hyprland-Dots-${latest_tag}.tar.gz"

# Download the latest release source code tarball to the current directory
if curl -L "$latest_tarball_url" -o "$file_name"; then
# Extract the contents of the tarball
tar -xzf "Hyprland-Dots-${specific_version}.tar.gz" || exit 1
tar -xzf "$file_name" || exit 1

# Delete existing Hyprland-Dots
# delete existing Hyprland-Dots
rm -rf JaKooLit-Hyprland-Dots

# Identify the extracted directory
extracted_directory=$(tar -tf "Hyprland-Dots-${specific_version}.tar.gz" | grep -o '^[^/]\+' | uniq)
extracted_directory=$(tar -tf "$file_name" | grep -o '^[^/]\+' | uniq)

# Rename the extracted directory to JaKooLit-Hyprland-Dots
mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1
Expand All @@ -56,9 +91,9 @@ if curl -L "$tarball_url" -o "Hyprland-Dots-${specific_version}.tar.gz"; then
chmod +x copy.sh
./copy.sh

echo -e "${OK} Hyprland-Dots-${specific_version} release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots folder for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${OK} Latest Dotfiles release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots folder for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
else
echo -e "${ERROR} Failed to download Hyprland-Dots-${specific_version} release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
echo -e "${ERROR} Failed to download the latest Dotfiles release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
exit 1
fi

Expand Down
61 changes: 61 additions & 0 deletions install-scripts/hyprcursor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# hyprcursor #

cursor=(
libzip-dev
librsvg2-dev
)

## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
# Determine the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Change the working directory to the parent directory of the script
PARENT_DIR="$SCRIPT_DIR/.."
cd "$PARENT_DIR" || exit 1

source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"

# Set the name of the log file to include the current date and time
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprcursor.log"
MLOG="install-$(date +%d-%H%M%S)_hyprcursor.log"

# Installation of dependencies
printf "\n%s - Installing hyprcursor dependencies.... \n" "${NOTE}"

for PKG1 in "${cursor[@]}"; do
install_package "$PKG1" 2>&1 | tee -a "$LOG"
if [ $? -ne 0 ]; then
echo -e "\e[1A\e[K${ERROR} - $PKG1 install had failed, please check the install.log"
exit 1
fi
done

# Check if hyprcursor folder exists and remove it
if [ -d "hyprcursor" ]; then
printf "${NOTE} Removing existing hyprcursor folder...\n"
rm -rf "hyprcursor"
fi

# Clone and build
printf "${NOTE} Installing hyprcursor...\n"
if git clone https://github.com/hyprwm/hyprcursor.git; then
cd hyprcursor || exit 1
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then
printf "${OK} hyprcursor installed successfully.\n" 2>&1 | tee -a "$MLOG"
else
echo -e "${ERROR} Installation failed for hyprcursor." 2>&1 | tee -a "$MLOG"
fi
#moving the addional logs to Install-Logs directory
mv $MLOG ../Install-Logs/ || true
cd ..
else
echo -e "${ERROR} Download failed for hyprcursor." 2>&1 | tee -a "$LOG"
fi

clear


Loading

0 comments on commit c19b76f

Please sign in to comment.