diff --git a/install-scripts/00-hypr-pkgs.sh b/install-scripts/00-hypr-pkgs.sh index eb573a0..b0e93f3 100755 --- a/install-scripts/00-hypr-pkgs.sh +++ b/install-scripts/00-hypr-pkgs.sh @@ -42,7 +42,6 @@ slurp swappy swaync swww -waybar wget wl-clipboard wlogout diff --git a/install-scripts/waybar-git.sh b/install-scripts/waybar-git.sh new file mode 100644 index 0000000..05b387e --- /dev/null +++ b/install-scripts/waybar-git.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# waybar - from source # + +waybar=( +cmake +meson +scdoc +wayland-protocols +clang-tidy +gobject-introspection +libdbusmenu-gtk3-dev +libevdev-dev +libfmt-dev +libgirepository1.0-dev +libgtk-3-dev +libgtkmm-3.0-dev +libinput-dev +libjsoncpp-dev +libmpdclient-dev +libnl-3-dev +libnl-genl-3-dev +libpulse-dev +libsigc++-2.0-dev +libspdlog-dev +libwayland-dev +scdoc +upower +libxkbregistry-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)waybar-git.log" + +# Installation of dependencies +printf "\n%s - Installing waybar-git dependencies.... \n" "${NOTE}" + +for PKG1 in "${waybar[@]}"; do + install_package "$PKG1" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs" + exit 1 + fi +done + +# Clone and build waybar from source +printf "${NOTE} Installing waybar...\n" +if git clone https://github.com/Alexays/Waybar; then + cd Waybar || exit 1 + meson build + if sudo ninja -C build install 2>&1 | tee -a "$LOG" ; then + printf "${OK} waybar-git installed successfully.\n" 2>&1 | tee -a "$LOG" + else + echo -e "${ERROR} Installation failed for waybar-git." 2>&1 | tee -a "$LOG" + fi +else + echo -e "${ERROR} Download failed for waybar-git" 2>&1 | tee -a "$LOG" +fi + +clear diff --git a/install.sh b/install.sh index 22e29c1..5b62c54 100755 --- a/install.sh +++ b/install.sh @@ -194,6 +194,9 @@ execute_script "fonts.sh" # Install hyprland execute_script "hyprland.sh" +# Install waybar +execute_script "waybar-git.sh" + if [ "$nvidia" == "Y" ]; then execute_script "nvidia.sh" fi