From aa140acf698cedc5e557b49abe4079f690248c1e Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sun, 2 Nov 2025 23:04:57 -0500 Subject: [PATCH 01/22] Don't remove AGS when installing quickshell Might need as backup when QS has issues. The Hyprland DOTS now use a wrapper script to determine which to use for overview On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: quickshell.sh --- install-scripts/quickshell.sh | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/install-scripts/quickshell.sh b/install-scripts/quickshell.sh index fb80751..92b041f 100755 --- a/install-scripts/quickshell.sh +++ b/install-scripts/quickshell.sh @@ -7,15 +7,18 @@ if [[ $USE_PRESET = [Yy] ]]; then fi quick=( - quickshell + quickshell ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } +cd "$PARENT_DIR" || { + echo "${ERROR} Failed to change directory to $PARENT_DIR" + exit 1 +} # Source the global functions script if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then @@ -23,8 +26,6 @@ if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then exit 1 fi - - # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_quick.log" @@ -32,19 +33,8 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_quick.log" printf "\n%s - Installing ${SKY_BLUE}Quick Shell ${RESET} for Desktop Overview \n" "${NOTE}" for PKG1 in "${quick[@]}"; do - install_package "$PKG1" "$LOG" + install_package "$PKG1" "$LOG" done -# removal of ags -# Check if the file exists and remove it -printf "\n%s - removing ${SKY_BLUE}AGS${RESET} \n" "${NOTE}" -if [ -f "/usr/local/bin/ags" ]; then - sudo rm -r /usr/local/bin/ags -fi +printf "\n%.0s" {1..1} -if [ -d "/usr/local/share/com.github.Aylur.ags" ]; then - sudo rm -rf /usr/local/share/com.github.Aylur.ags -fi - - -printf "\n%.0s" {1..1} \ No newline at end of file From f6a7c272290141fbbb527c0f18cfdd232d5eca7d Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" <85185940+JaKooLit@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:45:41 +0900 Subject: [PATCH 02/22] Update quickshell.sh --- install-scripts/quickshell.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-scripts/quickshell.sh b/install-scripts/quickshell.sh index 92b041f..2fbe227 100755 --- a/install-scripts/quickshell.sh +++ b/install-scripts/quickshell.sh @@ -7,7 +7,8 @@ if [[ $USE_PRESET = [Yy] ]]; then fi quick=( - quickshell + qt6-5compat + quickshell ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## From 5b427072aeaa064847cec3102440945b75b0ac53 Mon Sep 17 00:00:00 2001 From: mio-dokuhaki Date: Sun, 5 Oct 2025 13:06:18 +0900 Subject: [PATCH 03/22] Manually added monitor script documentation from Fedora PR #234 --- README.md | 114 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 80 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 4f0e838..3bb6eb6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ ![GitHub Repo stars](https://img.shields.io/github/stars/JaKooLit/Arch-Hyprland?style=for-the-badge&color=cba6f7) ![GitHub last commit](https://img.shields.io/github/last-commit/JaKooLit/Arch-Hyprland?style=for-the-badge&color=b4befe) ![GitHub repo size](https://img.shields.io/github/repo-size/JaKooLit/Arch-Hyprland?style=for-the-badge&color=cba6f7) -
@@ -54,45 +53,52 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872 ### Gallery and Videos + #### 🎥 Feb 2025 Video explanation of installation with preset + - [YOUTUBE-LINK](https://youtu.be/wQ70lo7P6vA?si=_QcbrNKh_Bg0L3wC) - [YOUTUBE-Hyprland-Playlist](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t) - ### 🪧🪧🪧 ANNOUNCEMENT 🪧🪧🪧 + - This Repo does not contain Hyprland Dots or configs! Dotfiles can be checked here [`Hyprland-Dots`](https://github.com/JaKooLit/Hyprland-Dots) . During installation, if you opt to copy pre-configured dots, it will be downloaded from that centralized repo. -- Hyprland-Dots use are constantly evolving / improving. you can check CHANGELOGS here [`Hyprland-Dots-Changelogs`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Changelogs) +- Hyprland-Dots use are constantly evolving / improving. you can check CHANGELOGS here [`Hyprland-Dots-Changelogs`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Changelogs) - Since the Hyprland-Dots are evolving, some of the screenshots maybe old - the wallpaper offered to be downloaded towards the end is from this [`REPO`](https://github.com/JaKooLit/Wallpaper-Bank) > [!IMPORTANT] > install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script (HIGHLY RECOMMENDED) -> [!CAUTION] +> [!CAUTION] > Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail -#### 🆕 Prerequisites +#### 🆕 Prerequisites + - This install script is intended for atleast Server type / Minimal Arch Linux installed. > [!NOTE] > 🔘 Pipewire and Pipewire audio -- This script will install pipewire and will also disable or will uninstall pulseaudio. If you dont want it, edit install.sh, about line 191 and comment the line `execute_script "pipewire.sh"` or you can simply just delete pipewire.sh in install-scripts directory before installing. + +- This script will install pipewire and will also disable or will uninstall pulseaudio. If you dont want it, edit install.sh, about line 191 and comment the line `execute_script "pipewire.sh"` or you can simply just delete pipewire.sh in install-scripts directory before installing. #### ✨ Customize the packages to be installed + - inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly! #### 🚩 Switching to SDDM assuming you have GDM installed and running + - if you really want switch to SDDM from GDM, you need to disable the gdm first. - `sudo systemctl disable gdm.service` then reboot -- after reboot, need to ran the install script via tty. So suggest download the install script first. Then disable gdm. reboot and once logged in, cd into Distro-Hyprland then `./install.sh` and then choose SDDM and SDDM theme in the options. +- after reboot, need to ran the install script via tty. So suggest download the install script first. Then disable gdm. reboot and once logged in, cd into Distro-Hyprland then `./install.sh` and then choose SDDM and SDDM theme in the options. - NOTE: Distro-Hyprland is Arch-Hyprland, or Fedora-Hyprland .. depends on which install scripts you downloaded. - #### 💫 SDDM and GTK Themes offered + - If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2) which is a modified fork of [`LINK`](https://github.com/Keyitdev/sddm-astronaut-theme) -- If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor. +- If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor. #### 👀 NVidia GPU Owners. + - By default, nvidia-dkms will be installed. and only supports GTX 900 and newer. If required to install older driver, edit the nvidia.sh in install-scripts directory > [!IMPORTANT] @@ -101,16 +107,19 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872 - After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users) ## ✨ Auto clone and install -> [!CAUTION] + +> [!CAUTION] > If you are using FISH SHELL, DO NOT use this function. Clone and ran install.sh instead - you can use this command to automatically clone the installer and ran the script for you - NOTE: `curl` package is required before running this command + ```bash sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/auto-install.sh) ``` ## ✨ to use this script + - clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script ```bash @@ -120,115 +129,151 @@ chmod +x install.sh ./install.sh ``` -### 💥 💥 UNINSTALL SCRIPT / Removal of Config Files +### 💥 💥 UNINSTALL SCRIPT / Removal of Config Files + - 11 March 2025, due to popular request, created a guided `uninstall.sh` script. USE this with caution as it may render your system unstable. - I will not be responsible if your system breaks - The best still to revert to previous state of your system is via `timeshift or snapper` #### ✨ for ZSH and OH-MY-ZSH installation + > installer should auto change your default shell to zsh. However, if it does not, do this + ```bash chsh -s $(which zsh) zsh source ~/.zshrc ``` + - reboot or logout - by default `agnosterzak` theme is installed. Which is from external oh-my-zsh theme. You can find more themes from this [`OH-MY-ZSH-THEMES`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) -- to change the theme, `SUPER SHIFT O` , choose desired theme, and close and open terminal. +- to change the theme, `SUPER SHIFT O` , choose desired theme, and close and open terminal. - or manually edit `~/.zshrc` . Look for ZSH_THEME="desired theme" #### 🎞️ AGS Overview DEMO + - in case you wonder, here is a short demo of AGS overview [Youtube LINK](https://youtu.be/zY5SLNPBJTs) #### ✨ TO DO once installation done and dotfiles copied -- SUPER H for HINT or click on the waybar HINT! Button + +- SUPER H for HINT or click on the waybar HINT! Button - Head over to [KooL Hyprland WIKI](https://github.com/JaKooLit/Hyprland-Dots/wiki) #### 🙋 Got a questions regarding the Hyprland Dots or configurations? 🙋 + - Head over to wiki Link [`WIKI`](https://github.com/JaKooLit/Hyprland-Dots/wiki) #### ⌨ Keybinds + - Keybinds [`CLICK`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds) > [!TIP] > KooL Hyprland has a searchable keybind function via rofi. (SUPER SHIFT K) or right click the `HINTS` waybar button - #### 🔄 switching between Hyprland-git and none Hyprland-git + - you can use my prepared script [`LINK`](https://github.com/JaKooLit/Arch-Hyprland/tree/main/assets/hyprland-install) - Readme is also there +#### 🙋 👋 Having issues or questions? -#### 🙋 👋 Having issues or questions? - for the install part, kindly open issue on this repo - 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 directory -- CD into Arch-Hyprland directory and then ran the below command. + +- CD into Arch-Hyprland directory and then ran the below command. - i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or - `./install-scripts/sddm.sh` - For reinstall sddm > [!IMPORTANT] > DO NOT cd into install-scripts directory as script will most likely to fail +> #### 🛠️ Optional system monitor scripts (cross-distro compatible) +> - These installer helpers will set up user-level services and install required packages automatically. +> - Works on Fedora, Arch, and other distributions using standard tools. +> - Re-run any time from the repo root (do not `cd` into `install-scripts`). + +- - `./install-scripts/battery-monitor.sh` +- - Installs: `acpi`, `libnotify` +- - Creates: `~/.config/hypr/scripts/battery-monitor.sh` and user service `battery-monitor.service` +- - Manage: `systemctl --user status|start|stop battery-monitor` +- - `./install-scripts/disk-monitor.sh` +- - Installs: `libnotify` +- - Creates: `~/.config/hypr/scripts/disk-monitor.sh` and user service `disk-monitor.service` +- - Manage: `systemctl --user status|start|stop disk-monitor` +- - `./install-scripts/temp-monitor.sh` +- - Installs: `lm_sensors`, `libnotify` +- - Detects sensors (runs `sudo sensors-detect --auto` once) +- - Creates: `~/.config/hypr/scripts/temp-monitor.sh` and user service `temp-monitor.service` +- - Manage: `systemctl --user status|start|stop temp-monitor` +- > Packages above are installed by the respective installer scripts; no manual action is required. If you prefer package pre-install via the main package list, ensure `acpi`, `lm_sensors`, and `libnotify` are present in your setup. +- #### 🛣️ Roadmap: + - [ ] show a progress bar in downloading and compiling part when installing outside AUR or official repo #### ❗ some known issues for nvidia -- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was -``` + +- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was + +``` while in sddm press ctrl+alt+F2 or F3 log into your account `lspci -nn`, find the id of your nvidia card `ls /dev/dri/by-path` find the matching id -`ls -l /dev/dri/by-path` to check where the symlink points to +`ls -l /dev/dri/by-path` to check where the symlink points to ) ``` -- add "env = WLR_DRM_DEVICES,/dev/dri/cardX" to the ENVvariables config `~/.config/hypr/UserConfigs/ENVariables.conf` ; X being where the symlink of the gpu points to + +- add "env = WLR_DRM_DEVICES,/dev/dri/cardX" to the ENVvariables config `~/.config/hypr/UserConfigs/ENVariables.conf` ; X being where the symlink of the gpu points to - 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) - - reports from a member of discord for Nvidia for additional env's -- remove # from the following env's on +- remove # from the following env's on + ``` env = GBM_BACKEND,nvidia-drm env = WLR_RENDERER_ALLOW_SOFTWARE,1 ``` #### ❗ other known issues + - [ ] If you are using this script on an Arch-Based distros like Arco linux, or cachy OS or EOS or Manjaro, make sure to install pipewire, pipewire-pulse & pipewire-audio first. Arco Linux, on some of their ISO's still shipped with pulseaudio as audio backend. You will experience getting "stuck" on installation. - [ ] To install pipewire and its services , `sudo pacman -S pipewire wireplumber pipewire-audio pipewire-pulse` . When prompted, remove / replace pulseaudio. After that, you can ran `./install.sh` -- [ ] installing of cava-git on a newly installed Arch makes the install keep hanging. Switched back to cava. After booting and logged in, if cava dont work, replace it cava-git `yay -S cava-git` or `paru -S cava-git` -> [!NOTE] -> Auto start of Hyprland after login (no SDDM or GDM or any login managers) -- [ ] This was disabled a few days ago. (19 May 2024). This was because some users, after they used the Distro-Hyprland scripts with other DE (gnome-wayland or plasma-wayland), if they choose to login into gnome-wayland for example, Hyprland is starting. +- [ ] installing of cava-git on a newly installed Arch makes the install keep hanging. Switched back to cava. After booting and logged in, if cava dont work, replace it cava-git `yay -S cava-git` or `paru -S cava-git` + > [!NOTE] + > Auto start of Hyprland after login (no SDDM or GDM or any login managers) +- [ ] This was disabled a few days ago. (19 May 2024). This was because some users, after they used the Distro-Hyprland scripts with other DE (gnome-wayland or plasma-wayland), if they choose to login into gnome-wayland for example, Hyprland is starting. - [ ] to avoid this, I disabled it. You can re-enable again by editing `~/.zprofile` . Remove all the # on the first lines - [ ] ROFI issues (scaling, unexplained scaling etc). This is most likely to experience if you are installing on a system where rofi is currently installed. To fix it uninstall rofi and install rofi-wayland . `sudo pacman -Rns rofi` . Install rofi-wayland with `sudo pacman -S rofi-wayland`. Rofi-wayland is compatible with x11 so no need to worry. - #### 🫥 Improving performance for Older Nvidia Cards using driver 470 - - [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205) + +- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205) #### 📒 Final Notes + - join my discord channel [`Discord`](https://discord.com/invite/kool-tech-world) - 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 :) - - #### ✍️ Contributing + - As stated above, these script does not contain actual config files. These are only the installer of packages - If you want to contribute and/or test the Hyprland-Dotfiles (development branch), [`Hyprland-Dots-Development`](https://github.com/JaKooLit/Hyprland-Dots/tree/development) - Want to contribute on KooL-Hyprland-Dots Click [`HERE`](https://github.com/JaKooLit/Hyprland-Dots/blob/main/CONTRIBUTING.md) for a guide how to contribute - Want to contribute on This Installer? Click [`HERE`](https://github.com/JaKooLit/Arch-Hyprland/blob/main/CONTRIBUTING.md) for a guide how to contribute #### 👍👍👍 Thanks and Credits! + - [`Hyprland`](https://hyprland.org/) Of course to Hyprland and @vaxerski for this awesome Dynamic Tiling Manager. ## 💖 Support + - a Star on my Github repos would be nice 🌟 -- Subscribe to my Youtube Channel [YouTube](https://www.youtube.com/@Ja.KooLit) +- Subscribe to my Youtube Channel [YouTube](https://www.youtube.com/@Ja.KooLit) - you can also give support through coffee's or btc 😊 @@ -238,15 +283,16 @@ or [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/JaKooLit) -Or you can donate cryto on my btc wallet :) +Or you can donate cryto on my btc wallet :) + > 1N3MeV2dsX6gQB42HXU6MF2hAix1mqjo8i ![Bitcoin](https://github.com/user-attachments/assets/7ed32f8f-c499-46f0-a53c-3f6fbd343699) +#### 📹 Youtube videos (Click to view and watch the playlist) 📹 -#### 📹 Youtube videos (Click to view and watch the playlist) 📹 [![Youtube Playlist Thumbnail](https://raw.githubusercontent.com/JaKooLit/screenshots/main/Youtube.png)](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t) - ## 🥰🥰 💖💖 👍👍👍 + [![Stargazers over time](https://starchart.cc/JaKooLit/Arch-Hyprland.svg?variant=adaptive)](https://starchart.cc/JaKooLit/Arch-Hyprland) From 0ab997e352b2b35cad5882fa05b480b1051c70b5 Mon Sep 17 00:00:00 2001 From: mio-dokuhaki Date: Sun, 5 Oct 2025 13:45:27 +0900 Subject: [PATCH 04/22] Add missing monitor scripts from Fedora-Hyprland PR #234 --- install-scripts/battery-monitor.sh | 116 +++++++++++++++++++++ install-scripts/disk-monitor.sh | 126 +++++++++++++++++++++++ install-scripts/temp-monitor.sh | 156 +++++++++++++++++++++++++++++ 3 files changed, 398 insertions(+) create mode 100644 install-scripts/battery-monitor.sh create mode 100644 install-scripts/disk-monitor.sh create mode 100644 install-scripts/temp-monitor.sh diff --git a/install-scripts/battery-monitor.sh b/install-scripts/battery-monitor.sh new file mode 100644 index 0000000..e98379b --- /dev/null +++ b/install-scripts/battery-monitor.sh @@ -0,0 +1,116 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Battery Monitor and Low Battery Notification # + +battery=( + acpi + libnotify +) + + +## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/install-$(date +%d-%H%M%S)_battery-monitor.log" + +# Battery Monitor +printf "${NOTE} Installing ${SKY_BLUE}Battery Monitor${RESET} Packages...\n" +for BAT in "${battery[@]}"; do + install_package "$BAT" "$LOG" +done + +# Create battery monitoring script +printf "${NOTE} Creating ${YELLOW}battery monitoring${RESET} script...\n" + +BATTERY_SCRIPT="$HOME/.config/hypr/scripts/battery-monitor.sh" +mkdir -p "$HOME/.config/hypr/scripts" + +cat > "$BATTERY_SCRIPT" << 'EOF' +#!/bin/bash +# Low Battery Notification Script +# Monitors battery level and sends notifications + +# Configuration +LOW_BATTERY_THRESHOLD=20 +CRITICAL_BATTERY_THRESHOLD=10 +CHECK_INTERVAL=60 # Check every 60 seconds + +# Track notification state to avoid spam +NOTIFIED_LOW=false +NOTIFIED_CRITICAL=false + +while true; do + # Get battery percentage + BATTERY_LEVEL=$(acpi -b | grep -P -o '[0-9]+(?=%)') + BATTERY_STATUS=$(acpi -b | grep -o 'Discharging\|Charging\|Full') + + # Only send notifications when discharging + if [ "$BATTERY_STATUS" = "Discharging" ]; then + if [ "$BATTERY_LEVEL" -le "$CRITICAL_BATTERY_THRESHOLD" ] && [ "$NOTIFIED_CRITICAL" = false ]; then + notify-send -u critical -i battery-caution "Critical Battery" "Battery level is at ${BATTERY_LEVEL}%! Please plug in your charger immediately." + NOTIFIED_CRITICAL=true + NOTIFIED_LOW=true + elif [ "$BATTERY_LEVEL" -le "$LOW_BATTERY_THRESHOLD" ] && [ "$NOTIFIED_LOW" = false ]; then + notify-send -u normal -i battery-low "Low Battery" "Battery level is at ${BATTERY_LEVEL}%. Consider plugging in your charger." + NOTIFIED_LOW=true + fi + else + # Reset notification flags when charging or full + NOTIFIED_LOW=false + NOTIFIED_CRITICAL=false + fi + + sleep "$CHECK_INTERVAL" +done +EOF + +chmod +x "$BATTERY_SCRIPT" + +printf "${OK} Battery monitoring script created at ${YELLOW}$BATTERY_SCRIPT${RESET}\n" + +# Create systemd user service +printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for battery monitoring...\n" + +SYSTEMD_DIR="$HOME/.config/systemd/user" +mkdir -p "$SYSTEMD_DIR" + +cat > "$SYSTEMD_DIR/battery-monitor.service" << EOF +[Unit] +Description=Battery Level Monitor +After=graphical-session.target + +[Service] +Type=simple +ExecStart=$BATTERY_SCRIPT +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=default.target +EOF + +printf "${OK} Systemd service created\n" + +# Enable and start the service +printf "${NOTE} Enabling and starting ${YELLOW}battery-monitor${RESET} service...\n" +systemctl --user daemon-reload +systemctl --user enable battery-monitor.service 2>&1 | tee -a "$LOG" +systemctl --user start battery-monitor.service 2>&1 | tee -a "$LOG" + +printf "${OK} Battery monitor service is now running!\n" +printf "${INFO} You can check status with: ${YELLOW}systemctl --user status battery-monitor${RESET}\n" +printf "${INFO} To stop: ${YELLOW}systemctl --user stop battery-monitor${RESET}\n" +printf "${INFO} To disable: ${YELLOW}systemctl --user disable battery-monitor${RESET}\n" + +printf "\n%.0s" {1..2} diff --git a/install-scripts/disk-monitor.sh b/install-scripts/disk-monitor.sh new file mode 100644 index 0000000..cd8a91d --- /dev/null +++ b/install-scripts/disk-monitor.sh @@ -0,0 +1,126 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Disk Space Monitor # + +disk=( + libnotify +) + + +## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/install-$(date +%d-%H%M%S)_disk-monitor.log" + +# Disk Monitor +printf "${NOTE} Installing ${SKY_BLUE}Disk Monitor${RESET} Packages...\n" +for DISK in "${disk[@]}"; do + install_package "$DISK" "$LOG" +done + +# Create disk monitoring script +printf "${NOTE} Creating ${YELLOW}disk space monitoring${RESET} script...\n" + +DISK_SCRIPT="$HOME/.config/hypr/scripts/disk-monitor.sh" +mkdir -p "$HOME/.config/hypr/scripts" + +cat > "$DISK_SCRIPT" << 'EOF' +#!/bin/bash +# Disk Space Monitoring Script +# Monitors disk usage and sends notifications + +# Configuration +DISK_WARNING_THRESHOLD=80 +DISK_CRITICAL_THRESHOLD=90 +CHECK_INTERVAL=300 # Check every 5 minutes + +# Track notification state +declare -A NOTIFIED_WARNING +declare -A NOTIFIED_CRITICAL + +while true; do + # Get disk usage for all mounted filesystems + df -h | grep '^/dev/' | while read -r line; do + DEVICE=$(echo "$line" | awk '{print $1}') + MOUNT=$(echo "$line" | awk '{print $6}') + USAGE=$(echo "$line" | awk '{print $5}' | sed 's/%//') + + # Skip if usage is not a number + if ! [[ "$USAGE" =~ ^[0-9]+$ ]]; then + continue + fi + + # Check disk usage + if [ "$USAGE" -ge "$DISK_CRITICAL_THRESHOLD" ]; then + if [ "${NOTIFIED_CRITICAL[$MOUNT]}" != "true" ]; then + notify-send -u critical -i drive-harddisk "Critical Disk Space" "Mount point $MOUNT is ${USAGE}% full!\nDevice: $DEVICE" + NOTIFIED_CRITICAL[$MOUNT]="true" + NOTIFIED_WARNING[$MOUNT]="true" + fi + elif [ "$USAGE" -ge "$DISK_WARNING_THRESHOLD" ]; then + if [ "${NOTIFIED_WARNING[$MOUNT]}" != "true" ]; then + notify-send -u normal -i drive-harddisk "Low Disk Space" "Mount point $MOUNT is ${USAGE}% full\nDevice: $DEVICE" + NOTIFIED_WARNING[$MOUNT]="true" + fi + else + # Reset notifications when usage drops + if [ "$USAGE" -lt $((DISK_WARNING_THRESHOLD - 5)) ]; then + NOTIFIED_WARNING[$MOUNT]="false" + NOTIFIED_CRITICAL[$MOUNT]="false" + fi + fi + done + + sleep "$CHECK_INTERVAL" +done +EOF + +chmod +x "$DISK_SCRIPT" + +printf "${OK} Disk monitoring script created at ${YELLOW}$DISK_SCRIPT${RESET}\n" + +# Create systemd user service +printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for disk monitoring...\n" + +SYSTEMD_DIR="$HOME/.config/systemd/user" +mkdir -p "$SYSTEMD_DIR" + +cat > "$SYSTEMD_DIR/disk-monitor.service" << EOF +[Unit] +Description=Disk Space Monitor +After=graphical-session.target + +[Service] +Type=simple +ExecStart=$DISK_SCRIPT +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=default.target +EOF + +printf "${OK} Systemd service created\n" + +# Enable and start the service +printf "${NOTE} Enabling and starting ${YELLOW}disk-monitor${RESET} service...\n" +systemctl --user daemon-reload +systemctl --user enable disk-monitor.service 2>&1 | tee -a "$LOG" +systemctl --user start disk-monitor.service 2>&1 | tee -a "$LOG" + +printf "${OK} Disk monitor service is now running!\n" +printf "${INFO} You can check status with: ${YELLOW}systemctl --user status disk-monitor${RESET}\n" +printf "${INFO} View disk usage: ${YELLOW}df -h${RESET}\n" + +printf "\n%.0s" {1..2} diff --git a/install-scripts/temp-monitor.sh b/install-scripts/temp-monitor.sh new file mode 100644 index 0000000..21b5281 --- /dev/null +++ b/install-scripts/temp-monitor.sh @@ -0,0 +1,156 @@ +#!/bin/bash +# 💫 https://github.com/JaKooLit 💫 # +# Temperature Monitor - CPU/GPU Temperature Alerts # + +temp=( + lm_sensors + libnotify +) + + +## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## +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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } + +# Source the global functions script +if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then + echo "Failed to source Global_functions.sh" + exit 1 +fi + +# Set the name of the log file to include the current date and time +LOG="Install-Logs/install-$(date +%d-%H%M%S)_temp-monitor.log" + +# Temperature Monitor +printf "${NOTE} Installing ${SKY_BLUE}Temperature Monitor${RESET} Packages...\n" +for TEMP in "${temp[@]}"; do + install_package "$TEMP" "$LOG" +done + +# Detect sensors +printf "${NOTE} Detecting ${YELLOW}hardware sensors${RESET}...\n" +sudo sensors-detect --auto 2>&1 | tee -a "$LOG" + +# Create temperature monitoring script +printf "${NOTE} Creating ${YELLOW}temperature monitoring${RESET} script...\n" + +TEMP_SCRIPT="$HOME/.config/hypr/scripts/temp-monitor.sh" +mkdir -p "$HOME/.config/hypr/scripts" + +cat > "$TEMP_SCRIPT" << 'EOF' +#!/bin/bash +# Temperature Monitoring Script +# Monitors CPU and GPU temperatures and sends alerts + +# Configuration +CPU_TEMP_WARNING=75 +CPU_TEMP_CRITICAL=85 +GPU_TEMP_WARNING=75 +GPU_TEMP_CRITICAL=85 +CHECK_INTERVAL=30 # Check every 30 seconds + +# Track notification state +NOTIFIED_CPU_WARN=false +NOTIFIED_CPU_CRIT=false +NOTIFIED_GPU_WARN=false +NOTIFIED_GPU_CRIT=false + +while true; do + # Get CPU temperature (average of all cores) + CPU_TEMP=$(sensors | grep -i 'Package id 0:\|Tdie:' | awk '{print $4}' | sed 's/+//;s/°C//' | head -1) + + # If Package id not found, try other methods + if [ -z "$CPU_TEMP" ]; then + CPU_TEMP=$(sensors | grep -i 'Core 0:' | awk '{print $3}' | sed 's/+//;s/°C//' | head -1) + fi + + # Get GPU temperature (if available) + GPU_TEMP=$(sensors | grep -i 'edge:\|temp1:' | awk '{print $2}' | sed 's/+//;s/°C//' | head -1) + + # Check CPU temperature + if [ -n "$CPU_TEMP" ]; then + CPU_TEMP_INT=${CPU_TEMP%.*} + + if [ "$CPU_TEMP_INT" -ge "$CPU_TEMP_CRITICAL" ]; then + if [ "$NOTIFIED_CPU_CRIT" = false ]; then + notify-send -u critical -i temperature-high "Critical CPU Temperature" "CPU temperature is ${CPU_TEMP}°C! System may throttle or shutdown." + NOTIFIED_CPU_CRIT=true + NOTIFIED_CPU_WARN=true + fi + elif [ "$CPU_TEMP_INT" -ge "$CPU_TEMP_WARNING" ]; then + if [ "$NOTIFIED_CPU_WARN" = false ]; then + notify-send -u normal -i temperature-normal "High CPU Temperature" "CPU temperature is ${CPU_TEMP}°C" + NOTIFIED_CPU_WARN=true + fi + else + NOTIFIED_CPU_WARN=false + NOTIFIED_CPU_CRIT=false + fi + fi + + # Check GPU temperature + if [ -n "$GPU_TEMP" ]; then + GPU_TEMP_INT=${GPU_TEMP%.*} + + if [ "$GPU_TEMP_INT" -ge "$GPU_TEMP_CRITICAL" ]; then + if [ "$NOTIFIED_GPU_CRIT" = false ]; then + notify-send -u critical -i temperature-high "Critical GPU Temperature" "GPU temperature is ${GPU_TEMP}°C!" + NOTIFIED_GPU_CRIT=true + NOTIFIED_GPU_WARN=true + fi + elif [ "$GPU_TEMP_INT" -ge "$GPU_TEMP_WARNING" ]; then + if [ "$NOTIFIED_GPU_WARN" = false ]; then + notify-send -u normal -i temperature-normal "High GPU Temperature" "GPU temperature is ${GPU_TEMP}°C" + NOTIFIED_GPU_WARN=true + fi + else + NOTIFIED_GPU_WARN=false + NOTIFIED_GPU_CRIT=false + fi + fi + + sleep "$CHECK_INTERVAL" +done +EOF + +chmod +x "$TEMP_SCRIPT" + +printf "${OK} Temperature monitoring script created at ${YELLOW}$TEMP_SCRIPT${RESET}\n" + +# Create systemd user service +printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for temperature monitoring...\n" + +SYSTEMD_DIR="$HOME/.config/systemd/user" +mkdir -p "$SYSTEMD_DIR" + +cat > "$SYSTEMD_DIR/temp-monitor.service" << EOF +[Unit] +Description=Temperature Monitor +After=graphical-session.target + +[Service] +Type=simple +ExecStart=$TEMP_SCRIPT +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=default.target +EOF + +printf "${OK} Systemd service created\n" + +# Enable and start the service +printf "${NOTE} Enabling and starting ${YELLOW}temp-monitor${RESET} service...\n" +systemctl --user daemon-reload +systemctl --user enable temp-monitor.service 2>&1 | tee -a "$LOG" +systemctl --user start temp-monitor.service 2>&1 | tee -a "$LOG" + +printf "${OK} Temperature monitor service is now running!\n" +printf "${INFO} You can check status with: ${YELLOW}systemctl --user status temp-monitor${RESET}\n" +printf "${INFO} View temperatures: ${YELLOW}sensors${RESET}\n" + +printf "\n%.0s" {1..2} From 6c86adfcdcc16d9a755f23dfd75b098bb0bf151a Mon Sep 17 00:00:00 2001 From: mio-dokuhaki Date: Sun, 5 Oct 2025 16:15:56 +0900 Subject: [PATCH 05/22] Fixed README.md for formatting --- README.md | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 3bb6eb6..a12718b 100644 --- a/README.md +++ b/README.md @@ -188,26 +188,25 @@ source ~/.zshrc > [!IMPORTANT] > DO NOT cd into install-scripts directory as script will most likely to fail -> #### 🛠️ Optional system monitor scripts (cross-distro compatible) -> - These installer helpers will set up user-level services and install required packages automatically. -> - Works on Fedora, Arch, and other distributions using standard tools. -> - Re-run any time from the repo root (do not `cd` into `install-scripts`). +#### 🛠️ Optional system monitor scripts (cross-distro compatible) +- These installer helpers will set up user-level services and install required packages automatically. +- Works on Fedora, Arch, and other distributions using standard tools. +- Re-run any time from the repo root (do not `cd` into `install-scripts`). -- - `./install-scripts/battery-monitor.sh` -- - Installs: `acpi`, `libnotify` -- - Creates: `~/.config/hypr/scripts/battery-monitor.sh` and user service `battery-monitor.service` -- - Manage: `systemctl --user status|start|stop battery-monitor` -- - `./install-scripts/disk-monitor.sh` -- - Installs: `libnotify` -- - Creates: `~/.config/hypr/scripts/disk-monitor.sh` and user service `disk-monitor.service` -- - Manage: `systemctl --user status|start|stop disk-monitor` -- - `./install-scripts/temp-monitor.sh` -- - Installs: `lm_sensors`, `libnotify` -- - Detects sensors (runs `sudo sensors-detect --auto` once) -- - Creates: `~/.config/hypr/scripts/temp-monitor.sh` and user service `temp-monitor.service` -- - Manage: `systemctl --user status|start|stop temp-monitor` -- > Packages above are installed by the respective installer scripts; no manual action is required. If you prefer package pre-install via the main package list, ensure `acpi`, `lm_sensors`, and `libnotify` are present in your setup. -- +- `./install-scripts/battery-monitor.sh` + - Installs: `acpi`, `libnotify` + - Creates: `~/.config/hypr/scripts/battery-monitor.sh` and user service `battery-monitor.service` + - Manage: `systemctl --user status|start|stop battery-monitor` +- `./install-scripts/disk-monitor.sh` + - Installs: `libnotify` + - Creates: `~/.config/hypr/scripts/disk-monitor.sh` and user service `disk-monitor.service` + - Manage: `systemctl --user status|start|stop disk-monitor` +- `./install-scripts/temp-monitor.sh` + - Installs: `lm_sensors`, `libnotify` + - Detects sensors (runs `sudo sensors-detect --auto` once) + - Creates: `~/.config/hypr/scripts/temp-monitor.sh` and user service `temp-monitor.service` + - Manage: `systemctl --user status|start|stop temp-monitor` +> Packages above are installed by the respective installer scripts; no manual action is required. If you prefer package pre-install via the main package list, ensure `acpi`, `lm_sensors`, and `libnotify` are present in your setup. #### 🛣️ Roadmap: From 93581957d47bebdb8698723f2b8f984860bf9644 Mon Sep 17 00:00:00 2001 From: Donald Williams <129223418+dwilliam62@users.noreply.github.com> Date: Sun, 5 Oct 2025 19:31:36 -0400 Subject: [PATCH 06/22] Update 01-hypr-pkgs.sh Rofi wayland now merged with rofi --- install-scripts/01-hypr-pkgs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-scripts/01-hypr-pkgs.sh b/install-scripts/01-hypr-pkgs.sh index a2f651e..b868d71 100755 --- a/install-scripts/01-hypr-pkgs.sh +++ b/install-scripts/01-hypr-pkgs.sh @@ -36,7 +36,7 @@ hypr_package=( qt5ct qt6ct qt6-svg - rofi-wayland + rofi slurp swappy swaync @@ -124,4 +124,4 @@ for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do install_package "$PKG1" "$LOG" done -printf "\n%.0s" {1..2} \ No newline at end of file +printf "\n%.0s" {1..2} From a9e33e5c58a76958c7733202cab32fdedeb2eeb2 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 3 Nov 2025 12:21:18 -0500 Subject: [PATCH 07/22] ags: fix GIRepository ESM import error by exporting GI_TYPELIB_PATH and dropping GIRepository prepend calls Context: - On systems where AGS v1 installs its typelibs to /usr/local/lib, gjs ESM imports like gi://GIRepository?version=2.0 fail with: "Typelib file for namespace 'GIRepository', version '2.0' not found" even though typelibs exist under /usr/lib{,64}/girepository-1.0. - The upstream AGS launcher tries to call GIR.Repository.prepend_search_path()/prepend_library_path(), but in recent GI (1.86) these are not available from the ESM namespace. Changes: - Replace import GIR from "gi://GIRepository?version=2.0" with import GLib from "gi://GLib" in the installed launcher. - Remove deprecated GIR.Repository.prepend_search_path and prepend_library_path calls. - Immediately after the GLib import, export GI_TYPELIB_PATH in-process so gjs finds typelibs under /usr/local/lib: const __old = GLib.getenv('GI_TYPELIB_PATH'); GLib.setenv('GI_TYPELIB_PATH', '/usr/local/lib' + (__old ? ':' + __old : ''), true); Result: - ags -t overview no longer errors on GIRepository; proceeds until a GTK display is required. - Behavior is scoped to the AGS process; no user shell env changes required. Notes: - Verified by patching an installed launcher on a target host; GI errors resolved. --- install-scripts/ags.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 8c741dc..74ff0a6 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -83,6 +83,25 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then meson setup build if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + + # Patch installed AGS launcher to ensure GI typelibs in /usr/local/lib are discoverable in GJS ESM + printf "${NOTE} Applying AGS launcher patch for GI typelibs search path...\n" + LAUNCHER="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" + if sudo test -f "$LAUNCHER"; then + # 1) Switch from GIRepository ESM import to GLib and drop deprecated prepend_* calls + sudo sed -i \ + -e 's|^import GIR from "gi://GIRepository?version=2.0";$|import GLib from "gi://GLib";|' \ + -e '/GIR.Repository.prepend_search_path/d' \ + -e '/GIR.Repository.prepend_library_path/d' \ + "$LAUNCHER" + + # 2) Inject GI_TYPELIB_PATH export right after the GLib import + sudo awk '{print} $0 ~ /^import GLib from "gi:\/\/GLib";$/ {print "const __old = GLib.getenv(\"GI_TYPELIB_PATH\");"; print "GLib.setenv(\"GI_TYPELIB_PATH\", \"/usr/local/lib\" + (__old ? \":\" + __old : \"\"), true);"}' "$LAUNCHER" | sudo tee "$LAUNCHER" >/dev/null + + printf "${OK} AGS launcher patched.\n" + else + printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n" + fi else echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" fi @@ -95,4 +114,4 @@ else exit 1 fi -printf "\n%.0s" {1..2} \ No newline at end of file +printf "\n%.0s" {1..2} From 2789e1544c47a86aae7e3e3f63852e73a74e69ca Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 13 Nov 2025 22:59:30 -0500 Subject: [PATCH 08/22] fixing AGS to install and not falsely report success MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added set -eo pipefail after sourcing Global_functions.sh so the script exits on failures and correctly fails when any command in a pipeline (like meson install | tee) fails. ◦ Added "ignoreDeprecations": "6.0" under compilerOptions to silence TS5107. ◦ Replaced moduleResolution "node10" with "node16" to be compatible with current TypeScript behavior. • The success message will now only be printed if meson actually succeeds On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 74ff0a6..386d05a 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -38,7 +38,8 @@ if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then exit 1 fi - +# Fail early and make pipelines fail if any command fails +set -eo pipefail # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log" @@ -79,13 +80,25 @@ printf "\n%.0s" {1..1} # Clone repository with the specified tag and capture git output into MLOG if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then cd ags_v1.9.0 || exit 1 + + # Patch tsconfig to avoid TS5107 failure (moduleResolution=node10 deprecation) + if [ -f tsconfig.json ]; then + if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then + if ! grep -q '"ignoreDeprecations"[[:space:]]*:' tsconfig.json; then + sed -i 's/"compilerOptions":[[:space:]]*{/"compilerOptions": {\n "ignoreDeprecations": "6.0",/' tsconfig.json + fi + # Prefer a modern module resolution to future-proof builds + sed -i 's/"moduleResolution"[[:space:]]*:[[:space:]]*"node10"/"moduleResolution": "node16"/' tsconfig.json || true + fi + fi + npm install meson setup build - if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then - printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" - - # Patch installed AGS launcher to ensure GI typelibs in /usr/local/lib are discoverable in GJS ESM - printf "${NOTE} Applying AGS launcher patch for GI typelibs search path...\n" + if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then + printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" + else + echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" + fi LAUNCHER="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" if sudo test -f "$LAUNCHER"; then # 1) Switch from GIRepository ESM import to GLib and drop deprecated prepend_* calls From f1e2d27625cf7cc9ca4d75cbbe48fbdc07e39a0d Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 13 Nov 2025 23:04:28 -0500 Subject: [PATCH 09/22] Fixed syntax error build failing still trying patch On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 386d05a..d8df309 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -83,13 +83,31 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then # Patch tsconfig to avoid TS5107 failure (moduleResolution=node10 deprecation) if [ -f tsconfig.json ]; then + # 1) Ensure ignoreDeprecations is present + if ! grep -q '"ignoreDeprecations"[[:space:]]*:' tsconfig.json; then + sed -i 's/"compilerOptions":[[:space:]]*{/"compilerOptions": {\n "ignoreDeprecations": "6.0",/' tsconfig.json + fi + # 2) Bump moduleResolution from node10 to node16 if present if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then - if ! grep -q '"ignoreDeprecations"[[:space:]]*:' tsconfig.json; then - sed -i 's/"compilerOptions":[[:space:]]*{/"compilerOptions": {\n "ignoreDeprecations": "6.0",/' tsconfig.json - fi - # Prefer a modern module resolution to future-proof builds sed -i 's/"moduleResolution"[[:space:]]*:[[:space:]]*"node10"/"moduleResolution": "node16"/' tsconfig.json || true fi + # 3) Fallback with Node to rewrite JSON if sed failed to catch patterns + if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then + if command -v node >/dev/null 2>&1; then + node -e ' + const fs = require("fs"); + const p = "tsconfig.json"; + const j = JSON.parse(fs.readFileSync(p, "utf8")); + j.compilerOptions = j.compilerOptions || {}; + if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16"; + if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0"; + fs.writeFileSync(p, JSON.stringify(j, null, 2)); + ' + fi + fi + # Log what we ended up with for troubleshooting + echo "== tsconfig.json after patch ==" >> "$MLOG" + grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true fi npm install @@ -99,6 +117,7 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then else echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" fi + LAUNCHER="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" if sudo test -f "$LAUNCHER"; then # 1) Switch from GIRepository ESM import to GLib and drop deprecated prepend_* calls @@ -115,9 +134,6 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then else printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n" fi - else - echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" - fi # Move logs to Install-Logs directory mv "$MLOG" ../Install-Logs/ || true cd .. From d1c0e897373960c6a770e6baf59dfd4012a87a18 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 13 Nov 2025 23:26:25 -0500 Subject: [PATCH 10/22] Fix to prevent 0byte ags file On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index d8df309..0e594ec 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -128,7 +128,13 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then "$LAUNCHER" # 2) Inject GI_TYPELIB_PATH export right after the GLib import - sudo awk '{print} $0 ~ /^import GLib from "gi:\/\/GLib";$/ {print "const __old = GLib.getenv(\"GI_TYPELIB_PATH\");"; print "GLib.setenv(\"GI_TYPELIB_PATH\", \"/usr/local/lib\" + (__old ? \":\" + __old : \"\"), true);"}' "$LAUNCHER" | sudo tee "$LAUNCHER" >/dev/null + # IMPORTANT: never read and write the same file in one pipeline; it can truncate to 0 bytes. + # Write to a temp file and then move it into place. + if ! sudo grep -q 'GLib.setenv("GI_TYPELIB_PATH"' "$LAUNCHER"; then + TMP_FILE="$(mktemp)" + sudo awk '{print} $0 ~ /^import GLib from "gi:\/\/GLib";$/ {print "const __old = GLib.getenv(\"GI_TYPELIB_PATH\");"; print "GLib.setenv(\"GI_TYPELIB_PATH\", \"/usr/local/lib\" + (__old ? \":\" + __old : \"\"), true);"}' "$LAUNCHER" | sudo tee "$TMP_FILE" >/dev/null + sudo mv "$TMP_FILE" "$LAUNCHER" + fi printf "${OK} AGS launcher patched.\n" else From f231d77b5ca28fa736fd8439e8635c8b151a9d35 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 00:27:51 -0500 Subject: [PATCH 11/22] Fixing ags script for overview launcher On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 68 +++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 0e594ec..ab2de50 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -118,28 +118,56 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" fi - LAUNCHER="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" - if sudo test -f "$LAUNCHER"; then - # 1) Switch from GIRepository ESM import to GLib and drop deprecated prepend_* calls - sudo sed -i \ - -e 's|^import GIR from "gi://GIRepository?version=2.0";$|import GLib from "gi://GLib";|' \ - -e '/GIR.Repository.prepend_search_path/d' \ - -e '/GIR.Repository.prepend_library_path/d' \ - "$LAUNCHER" + LAUNCHER_DIR="/usr/local/share/com.github.Aylur.ags" + LAUNCHER_PATH="$LAUNCHER_DIR/com.github.Aylur.ags" + sudo mkdir -p "$LAUNCHER_DIR" - # 2) Inject GI_TYPELIB_PATH export right after the GLib import - # IMPORTANT: never read and write the same file in one pipeline; it can truncate to 0 bytes. - # Write to a temp file and then move it into place. - if ! sudo grep -q 'GLib.setenv("GI_TYPELIB_PATH"' "$LAUNCHER"; then - TMP_FILE="$(mktemp)" - sudo awk '{print} $0 ~ /^import GLib from "gi:\/\/GLib";$/ {print "const __old = GLib.getenv(\"GI_TYPELIB_PATH\");"; print "GLib.setenv(\"GI_TYPELIB_PATH\", \"/usr/local/lib\" + (__old ? \":\" + __old : \"\"), true);"}' "$LAUNCHER" | sudo tee "$TMP_FILE" >/dev/null - sudo mv "$TMP_FILE" "$LAUNCHER" - fi + # Install a known-good launcher that sets GI_TYPELIB_PATH so GUtils and other + # typelibs can be found, matching the working setup on jak-cachy. + sudo tee "$LAUNCHER_PATH" >/dev/null <<'EOF' +#!/usr/sbin/gjs -m - printf "${OK} AGS launcher patched.\n" - else - printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n" - fi +import { exit, programArgs, programInvocationName } from "system"; +import GLib from "gi://GLib"; + +GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true); + +imports.package.init({ + name: "com.github.Aylur.ags", + version: "1.9.0", + prefix: "/usr/local", + libdir: "/usr/local/lib", +}); + +const module = await import("resource:///com/github/Aylur/ags/main.js"); +const exitCode = await module.main([programInvocationName, ...programArgs]); +exit(exitCode); +EOF + + # Also install a convenience launcher in /usr/local/bin/ags + sudo mkdir -p /usr/local/bin + sudo tee /usr/local/bin/ags >/dev/null <<'EOF' +#!/usr/sbin/gjs -m + +import { exit, programArgs, programInvocationName } from "system"; +import GLib from "gi://GLib"; + +GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true); + +imports.package.init({ + name: "com.github.Aylur.ags", + version: "1.9.0", + prefix: "/usr/local", + libdir: "/usr/local/lib", +}); + +const module = await import("resource:///com/github/Aylur/ags/main.js"); +const exitCode = await module.main([programInvocationName, ...programArgs]); +exit(exitCode); +EOF + + sudo chmod +x /usr/local/bin/ags + printf "${OK} AGS launcher installed.\n" # Move logs to Install-Logs directory mv "$MLOG" ../Install-Logs/ || true cd .. From bcfade3e24208f631bbc353135df3d58beac002f Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 00:31:38 -0500 Subject: [PATCH 12/22] Checking for install triggered broken ags to start On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index ab2de50..d86175c 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -45,16 +45,9 @@ set -eo pipefail LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log" MLOG="install-$(date +%d-%H%M%S)_ags2.log" -# Check if AGS is installed -if command -v ags &>/dev/null; then - AGS_VERSION=$(ags -v | awk '{print $NF}') - if [[ "$AGS_VERSION" == "1.9.0" ]]; then - printf "${INFO} ${MAGENTA}Aylur's GTK Shell v1.9.0${RESET} is already installed. Skipping installation." - printf "\n%.0s" {1..2} - exit 0 - fi -fi - +# NOTE: We intentionally do NOT run `ags -v` here, because a broken AGS +# installation (missing GUtils, etc.) would crash gjs and spam errors +# during install. We always (re)install v1.9.0 when this script is run. # Installation of main components printf "\n%s - Installing ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}" From 27b7ba557886dd5291453ebcbaad6eda3eb5c1db Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 00:43:53 -0500 Subject: [PATCH 13/22] Fix attempt #2 GI_TYPELIB_PATH is read before set On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index d86175c..c6d34ff 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -137,30 +137,35 @@ const exitCode = await module.main([programInvocationName, ...programArgs]); exit(exitCode); EOF - # Also install a convenience launcher in /usr/local/bin/ags + # Also install a convenience launcher in /usr/local/bin/ags as a shell wrapper + # so GI_TYPELIB_PATH is set *before* gjs and GIRepository are initialized. sudo mkdir -p /usr/local/bin sudo tee /usr/local/bin/ags >/dev/null <<'EOF' -#!/usr/sbin/gjs -m +#!/usr/bin/env bash +set -euo pipefail -import { exit, programArgs, programInvocationName } from "system"; -import GLib from "gi://GLib"; +# Start from user's home for configs that expect $HOME. +cd "$HOME" 2>/dev/null || true -GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true); +# Locate AGS ESM entry +MAIN_JS="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" +if [ ! -f "$MAIN_JS" ]; then + MAIN_JS="/usr/share/com.github.Aylur.ags/com.github.Aylur.ags" +fi +if [ ! -f "$MAIN_JS" ]; then + echo "Unable to find AGS entry script (com.github.Aylur.ags) in /usr/local/share or /usr/share" >&2 + exit 1 +fi -imports.package.init({ - name: "com.github.Aylur.ags", - version: "1.9.0", - prefix: "/usr/local", - libdir: "/usr/local/lib", -}); +# Ensure GI typelibs and native libs are discoverable before gjs ESM loads +export GI_TYPELIB_PATH="/usr/local/lib64:/usr/local/lib:/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib64/ags:${GI_TYPELIB_PATH-}" +export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH-}" -const module = await import("resource:///com/github/Aylur/ags/main.js"); -const exitCode = await module.main([programInvocationName, ...programArgs]); -exit(exitCode); +exec /usr/bin/gjs -m "$MAIN_JS" -- "$@" EOF sudo chmod +x /usr/local/bin/ags - printf "${OK} AGS launcher installed.\n" + printf "${OK} AGS launcher installed.\\n" # Move logs to Install-Logs directory mv "$MLOG" ../Install-Logs/ || true cd .. From 46728206a0bf047f1f0bb0c03c8ed5bfca3b0680 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 01:03:18 -0500 Subject: [PATCH 14/22] Patching tsconfig.json On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index c6d34ff..45a686c 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -87,12 +87,35 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then # 3) Fallback with Node to rewrite JSON if sed failed to catch patterns if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then if command -v node >/dev/null 2>&1; then - node -e ' - const fs = require("fs"); - const p = "tsconfig.json"; - const j = JSON.parse(fs.readFileSync(p, "utf8")); - j.compilerOptions = j.compilerOptions || {}; - if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16"; + node -e '\n const fs = require("fs");\n const p = "tsconfig.json";\n const j = JSON.parse(fs.readFileSync(p, "utf8"));\n j.compilerOptions = j.compilerOptions || {};\n if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16";\n if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0";\n fs.writeFileSync(p, JSON.stringify(j, null, 2));\n '\n fi + fi + # Log what we ended up with for troubleshooting + echo "== tsconfig.json after patch ==" >> "$MLOG" + grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true + fi + + # Patch pam.ts to avoid ESM gi://GUtils, which fails on some GJS builds (e.g. Arch), + # and instead use the older imports.gi API that we know works. + if [ -f src/utils/pam.ts ]; then + if grep -q "import GUtils from 'gi://GUtils'" src/utils/pam.ts; then + printf "%s Patching src/utils/pam.ts to use imports.gi.GUtils...\n" "${NOTE}" | tee -a "$MLOG" + tmp_pam="$(mktemp)" + awk ' + NR==1 { + print "// Patched by install-scripts/ags.sh to avoid gi://GUtils ESM issues"; + print "// eslint-disable-next-line @typescript-eslint/ban-ts-comment"; + print "// @ts-ignore"; + print "declare const imports: any;"; + } + $0 ~ /^import GUtils from '\''gi:\/\/GUtils'\'';/ { + print "const GUtils = imports.gi.GUtils as any;"; + next; + } + { print } + ' src/utils/pam.ts > "$tmp_pam" + mv "$tmp_pam" src/utils/pam.ts + fi + fi if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0"; fs.writeFileSync(p, JSON.stringify(j, null, 2)); ' From 1808001bdba3b0c2620830fe6ff74022bc5d0566 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 01:07:36 -0500 Subject: [PATCH 15/22] Fixed syntax error --- install-scripts/ags.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 45a686c..92f2c10 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -116,15 +116,6 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then mv "$tmp_pam" src/utils/pam.ts fi fi - if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0"; - fs.writeFileSync(p, JSON.stringify(j, null, 2)); - ' - fi - fi - # Log what we ended up with for troubleshooting - echo "== tsconfig.json after patch ==" >> "$MLOG" - grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true - fi npm install meson setup build From 9cf06be5390248dd4764828d4a1e4cf666e6fff8 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 01:12:12 -0500 Subject: [PATCH 16/22] Try again --- install-scripts/ags.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 92f2c10..d7673b3 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -70,7 +70,7 @@ fi printf "\n%.0s" {1..1} printf "${INFO} Kindly Standby...cloning and compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}...\n" printf "\n%.0s" {1..1} -# Clone repository with the specified tag and capture git output into MLOG +# Clone repository with the specified tag and compile AGS if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then cd ags_v1.9.0 || exit 1 @@ -87,7 +87,8 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then # 3) Fallback with Node to rewrite JSON if sed failed to catch patterns if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then if command -v node >/dev/null 2>&1; then - node -e '\n const fs = require("fs");\n const p = "tsconfig.json";\n const j = JSON.parse(fs.readFileSync(p, "utf8"));\n j.compilerOptions = j.compilerOptions || {};\n if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16";\n if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0";\n fs.writeFileSync(p, JSON.stringify(j, null, 2));\n '\n fi + node -e '\n const fs = require("fs");\n const p = "tsconfig.json";\n const j = JSON.parse(fs.readFileSync(p, "utf8"));\n j.compilerOptions = j.compilerOptions || {};\n if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16";\n if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0";\n fs.writeFileSync(p, JSON.stringify(j, null, 2));\n ' + fi fi # Log what we ended up with for troubleshooting echo "== tsconfig.json after patch ==" >> "$MLOG" From 956fb369b59804bfaea8b19c0a9472163cccca86 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 01:17:20 -0500 Subject: [PATCH 17/22] Fixing mesaon build errors --- install-scripts/ags.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index d7673b3..05138ae 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -95,26 +95,15 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true fi - # Patch pam.ts to avoid ESM gi://GUtils, which fails on some GJS builds (e.g. Arch), - # and instead use the older imports.gi API that we know works. + # Patch pam.ts to avoid ESM gi://GUtils (which breaks on some GJS builds) + # and instead use imports.gi.GUtils, which we know works from runtime tests. if [ -f src/utils/pam.ts ]; then if grep -q "import GUtils from 'gi://GUtils'" src/utils/pam.ts; then printf "%s Patching src/utils/pam.ts to use imports.gi.GUtils...\n" "${NOTE}" | tee -a "$MLOG" - tmp_pam="$(mktemp)" - awk ' - NR==1 { - print "// Patched by install-scripts/ags.sh to avoid gi://GUtils ESM issues"; - print "// eslint-disable-next-line @typescript-eslint/ban-ts-comment"; - print "// @ts-ignore"; - print "declare const imports: any;"; - } - $0 ~ /^import GUtils from '\''gi:\/\/GUtils'\'';/ { - print "const GUtils = imports.gi.GUtils as any;"; - next; - } - { print } - ' src/utils/pam.ts > "$tmp_pam" - mv "$tmp_pam" src/utils/pam.ts + # 1) Drop the upstream // @ts-expect-error line (it causes TS2578 now). + sed -i '/@ts-expect-error/d' src/utils/pam.ts + # 2) Replace the gi:// import with an imports.gi-based binding. + sed -i "s|import GUtils from 'gi://GUtils';|// Patched by install-scripts/ags.sh to avoid gi://GUtils ESM issues\\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\\n// @ts-ignore\\ndeclare const imports: any;\\nconst GUtils = (imports as any).gi.GUtils as any;|" src/utils/pam.ts fi fi @@ -124,6 +113,11 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG" + # Abort here on build/install failure so we do NOT install a broken launcher + # or report success when AGS binaries are missing. + mv "$MLOG" ../Install-Logs/ || true + cd .. + exit 1 fi LAUNCHER_DIR="/usr/local/share/com.github.Aylur.ags" From 23f52b3f00c901d4ee22b26f30cbd17ef248f585 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 02:04:49 -0500 Subject: [PATCH 18/22] Saving working script before adding to AGS.SH On branch development Your branch is up to date with 'origin/development'. Changes to be committed: new file: install-scripts/ags.launcher.com.github.Aylur.ags --- .../ags.launcher.com.github.Aylur.ags | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 install-scripts/ags.launcher.com.github.Aylur.ags diff --git a/install-scripts/ags.launcher.com.github.Aylur.ags b/install-scripts/ags.launcher.com.github.Aylur.ags new file mode 100755 index 0000000..4cde41c --- /dev/null +++ b/install-scripts/ags.launcher.com.github.Aylur.ags @@ -0,0 +1,18 @@ +#!/usr/bin/gjs -m + +import { exit, programArgs, programInvocationName } from "system"; +import GLib from "gi://GLib"; + +// Ensure GI can see typelibs in /usr/local and the system girepository +GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true); + +imports.package.init({ + name: "com.github.Aylur.ags", + version: "1.9.0", + prefix: "/usr/local", + libdir: "/usr/local/lib", +}); + +const module = await import("resource:///com/github/Aylur/ags/main.js"); +const exitCode = await module.main([programInvocationName, ...programArgs]); +exit(exitCode); From 47f4e4d7b654681dac18d2c63a89ad120f0d47ec Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 14 Nov 2025 02:09:16 -0500 Subject: [PATCH 19/22] Fixed AGS v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It now does the following: ◦ Clone upstream AGS 1.9.0. ◦ Stub out PAM/GUtils via pam.ts. ◦ Build and install AGS. ◦ Install the known-good launcher from install-scripts/ags.launcher.com.github.Aylur.ags. ◦ Point /usr/local/bin/ags at that launcher. On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: install-scripts/ags.sh --- install-scripts/ags.sh | 86 ++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 57 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 05138ae..daaf790 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -95,16 +95,25 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true fi - # Patch pam.ts to avoid ESM gi://GUtils (which breaks on some GJS builds) - # and instead use imports.gi.GUtils, which we know works from runtime tests. + # Replace pam.ts with a stub that does NOT depend on GUtils at all. + # The desktop overview does not use PAM, and GUtils typelib support is + # inconsistent across distros, so we disable these helpers instead of + # crashing at startup when the typelib is missing. if [ -f src/utils/pam.ts ]; then - if grep -q "import GUtils from 'gi://GUtils'" src/utils/pam.ts; then - printf "%s Patching src/utils/pam.ts to use imports.gi.GUtils...\n" "${NOTE}" | tee -a "$MLOG" - # 1) Drop the upstream // @ts-expect-error line (it causes TS2578 now). - sed -i '/@ts-expect-error/d' src/utils/pam.ts - # 2) Replace the gi:// import with an imports.gi-based binding. - sed -i "s|import GUtils from 'gi://GUtils';|// Patched by install-scripts/ags.sh to avoid gi://GUtils ESM issues\\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\\n// @ts-ignore\\ndeclare const imports: any;\\nconst GUtils = (imports as any).gi.GUtils as any;|" src/utils/pam.ts - fi + printf "%s Replacing src/utils/pam.ts with PAM stub (no GUtils dependency)...\\n" "${NOTE}" | tee -a "$MLOG" + cat > src/utils/pam.ts <<'PAM_STUB' +// Stubbed PAM auth for AGS installed via Arch-Hyprland. +// The desktop overview does not use PAM, and GUtils typelib support +// is unreliable across distros, so we disable these helpers here. + +export function authenticate(password: string): Promise { + return Promise.reject(new Error("PAM authentication disabled on this system (no GUtils)")); +} + +export function authenticateUser(username: string, password: string): Promise { + return Promise.reject(new Error("PAM authentication disabled on this system (no GUtils)")); +} +PAM_STUB fi npm install @@ -124,56 +133,19 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then LAUNCHER_PATH="$LAUNCHER_DIR/com.github.Aylur.ags" sudo mkdir -p "$LAUNCHER_DIR" - # Install a known-good launcher that sets GI_TYPELIB_PATH so GUtils and other - # typelibs can be found, matching the working setup on jak-cachy. - sudo tee "$LAUNCHER_PATH" >/dev/null <<'EOF' -#!/usr/sbin/gjs -m + # Install the known-good launcher we captured from a working system. + # This JS entry script uses GLib to set GI_TYPELIB_PATH and does not + # depend on GIRepository, which avoids missing-typelib crashes. + LAUNCHER_SRC="$SCRIPT_DIR/ags.launcher.com.github.Aylur.ags" + if [ -f "$LAUNCHER_SRC" ]; then + sudo install -m 755 "$LAUNCHER_SRC" "$LAUNCHER_PATH" + else + printf "${WARN} Saved launcher not found at %s; leaving Meson-installed launcher untouched.\\n" "$LAUNCHER_SRC" | tee -a "$MLOG" + fi -import { exit, programArgs, programInvocationName } from "system"; -import GLib from "gi://GLib"; - -GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true); - -imports.package.init({ - name: "com.github.Aylur.ags", - version: "1.9.0", - prefix: "/usr/local", - libdir: "/usr/local/lib", -}); - -const module = await import("resource:///com/github/Aylur/ags/main.js"); -const exitCode = await module.main([programInvocationName, ...programArgs]); -exit(exitCode); -EOF - - # Also install a convenience launcher in /usr/local/bin/ags as a shell wrapper - # so GI_TYPELIB_PATH is set *before* gjs and GIRepository are initialized. + # Ensure /usr/local/bin/ags points to the JS entry script. sudo mkdir -p /usr/local/bin - sudo tee /usr/local/bin/ags >/dev/null <<'EOF' -#!/usr/bin/env bash -set -euo pipefail - -# Start from user's home for configs that expect $HOME. -cd "$HOME" 2>/dev/null || true - -# Locate AGS ESM entry -MAIN_JS="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" -if [ ! -f "$MAIN_JS" ]; then - MAIN_JS="/usr/share/com.github.Aylur.ags/com.github.Aylur.ags" -fi -if [ ! -f "$MAIN_JS" ]; then - echo "Unable to find AGS entry script (com.github.Aylur.ags) in /usr/local/share or /usr/share" >&2 - exit 1 -fi - -# Ensure GI typelibs and native libs are discoverable before gjs ESM loads -export GI_TYPELIB_PATH="/usr/local/lib64:/usr/local/lib:/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib64/ags:${GI_TYPELIB_PATH-}" -export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH-}" - -exec /usr/bin/gjs -m "$MAIN_JS" -- "$@" -EOF - - sudo chmod +x /usr/local/bin/ags + sudo ln -srf "$LAUNCHER_PATH" /usr/local/bin/ags printf "${OK} AGS launcher installed.\\n" # Move logs to Install-Logs directory mv "$MLOG" ../Install-Logs/ || true From bbeaa681e03d75febe58f80a0af50eead31779db Mon Sep 17 00:00:00 2001 From: Ahum Maitra Date: Tue, 9 Dec 2025 18:45:41 +0530 Subject: [PATCH 20/22] docs : Fix Nvidia Spelling in README (#346) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a12718b..88cfbff 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872 - If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2) which is a modified fork of [`LINK`](https://github.com/Keyitdev/sddm-astronaut-theme) - If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor. -#### 👀 NVidia GPU Owners. +#### 👀 Nvidia GPU Owners. - By default, nvidia-dkms will be installed. and only supports GTX 900 and newer. If required to install older driver, edit the nvidia.sh in install-scripts directory From 3781f9c51020ac1ab30327b0e65466617db37e15 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 11 Dec 2025 10:48:47 -0500 Subject: [PATCH 21/22] Adding qt5-quickcontrols2 to sddm.sh A user reported in CachyOS this missing package prevented Hyprland from starting via SDDM with simple_sddm_2 theme Standard SDDM theme worked on. Adding this pkg also resolved issue On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: sddm.sh --- install-scripts/sddm.sh | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/install-scripts/sddm.sh b/install-scripts/sddm.sh index 0e709cd..36369d1 100755 --- a/install-scripts/sddm.sh +++ b/install-scripts/sddm.sh @@ -2,29 +2,33 @@ # 💫 https://github.com/JaKooLit 💫 # # SDDM Log-in Manager # -sddm=( - qt6-declarative +sddm=( + qt6-declarative qt6-svg qt6-virtualkeyboard qt6-multimedia-ffmpeg + qt5-quickcontrols2 sddm ) # login managers to attempt to disable login=( - lightdm - gdm3 - gdm - lxdm + lightdm + gdm3 + gdm + lxdm lxdm-gtk3 ) ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ## -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +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" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; } +cd "$PARENT_DIR" || { + echo "${ERROR} Failed to change directory to $PARENT_DIR" + exit 1 +} # Source the global functions script if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then @@ -32,33 +36,30 @@ if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then exit 1 fi - - # Set the name of the log file to include the current date and time LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log" - # Install SDDM and SDDM theme printf "${NOTE} Installing sddm and dependencies........\n" - for package in "${sddm[@]}"; do +for package in "${sddm[@]}"; do install_package "$package" "$LOG" - done +done printf "\n%.0s" {1..1} # Check if other login managers installed and disabling its service before enabling sddm for login_manager in "${login[@]}"; do - if pacman -Qs "$login_manager" > /dev/null 2>&1; then - sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1 - echo "$login_manager disabled." >> "$LOG" 2>&1 + if pacman -Qs "$login_manager" >/dev/null 2>&1; then + sudo systemctl disable "$login_manager.service" >>"$LOG" 2>&1 + echo "$login_manager disabled." >>"$LOG" 2>&1 fi done # Double check with systemctl for manager in "${login[@]}"; do - if systemctl is-active --quiet "$manager" > /dev/null 2>&1; then - echo "$manager is active, disabling it..." >> "$LOG" 2>&1 - sudo systemctl disable "$manager" --now >> "$LOG" 2>&1 + if systemctl is-active --quiet "$manager" >/dev/null 2>&1; then + echo "$manager is active, disabling it..." >>"$LOG" 2>&1 + sudo systemctl disable "$manager" --now >>"$LOG" 2>&1 fi done @@ -67,6 +68,10 @@ printf "${INFO} Activating sddm service........\n" sudo systemctl enable sddm wayland_sessions_dir=/usr/share/wayland-sessions -[ ! -d "$wayland_sessions_dir" ] && { printf "$CAT - $wayland_sessions_dir not found, creating...\n"; sudo mkdir "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"; } +[ ! -d "$wayland_sessions_dir" ] && { + printf "$CAT - $wayland_sessions_dir not found, creating...\n" + sudo mkdir "$wayland_sessions_dir" 2>&1 | tee -a "$LOG" +} + +printf "\n%.0s" {1..2} -printf "\n%.0s" {1..2} \ No newline at end of file From ae0c8b155c1ff2975f7457fa7205db81651ac46a Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 11 Dec 2025 11:51:06 -0500 Subject: [PATCH 22/22] Updated CHANGELOG --- CHANGELOGS.md | 98 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 90 insertions(+), 8 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index d227474..94f4995 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,230 +1,312 @@ ## CHANGELOGS +## Dec 2025 + +Added: + +- `qt5-quickcontrols2` to sddm.sh - User reported w/o this SDDM crashed on login + Fixed: +- AGS v1 + - It now does the following: + - Clone upstream AGS 1.9.0. + - Stub out PAM/GUtils via pam.ts. + - Build and install AGS. + - Install the known-good launcher from install-scripts/ags.launcher.com.github.Aylur.ags. + - Points /usr/local/bin/ags at that launcher. + - AGS is no longer removed when you add quickshell. + - AGS overview is a backup if quickshell overview fails. +- meson build errors +- `rofi-wayland` package changed to 'rofi' +- Add missing monitor scripts from Fedora-Hyprland PR #234 + ## 22 July 2025 + - Updated sddm theme and script to work with the updated simple_sddm_2 theme ## 17 July 2025 + - added quickshell script to replace ags for desktop overview ## 08 June 2025 -- updated SDDM theme. + +- updated SDDM theme. ## 20 March 2025 + - adjusted hyprland installation script. This is great for those who are using -git packages - added findutils as dependencies ## 11 March 2025 + - Added uninstall script - forked AGS v1 into JakooLit repo. This is just incase Aylur decide to take down v1 ## 10 March 2025 + - Dropped pyprland in favor of hyprland built in tool for a drop down like terminal and Desktop magnifier ## 06 March 2025 + - Switched to whiptail version for Y & N questions - switched eza to lsd ## 23 Feb 2025 + - added Victor Mono Font for proper hyprlock font rendering for Dots v2.3.12 - added Fantasque Sans Mono Nerd for Kitty ## 22 Feb 2025 + - replaced eog with loupe - changed url for installing oh-my-zsh to get wider coverage. Some countries are blocking github raw url's ## 20 Feb 2025 + - Added nwg-displays for the upcoming Kools dots v2.3.12 ## 18 Feb 2025 + - Change default zsh theme to adnosterzak - pokemon coloscript integrated with fastfetch when opted with pokemon to add some bling - additional external oh-my-zsh theme ## 06 Feb 2025 + - added semi-unattended function. - move all the initial questions at the beginning ## 04 Feb 2025 + - Re-coded for better visibility - Offered a new SDDM theme. - script will automatically detect if you have nvidia but script still offer if you want to set up for user ## 29 Jan 2025 + - enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia ## 16 Jan 2025 -- updated nvidia.sh to install non-git libva-nvidia-driver + +- updated nvidia.sh to install non-git libva-nvidia-driver ## 13 Jan 2025 + - replaced polkit-gnome with hyprpolkitagent ## 12 Jan 2025 + - switch to final version of aylurs-gtk-shell-v1 ## 11 Jan 2025 + - added cachyos-hyprland-settings to uninstall ## 06 Jan 2025 + - added copying of modified fastfetch-compact for Arch -- default theme for oh my zsh theme is now "funky" +- default theme for oh my zsh theme is now "funky" ## 26 Dec 2024 + - Removal of Bibata Ice cursor on assets since its integrated in the GTK Themes and Icons extract from a separate repo - integrated hyprcursor in Bibata Ice Cursor ## 15 Nov 2024 + - revert Aylurs GTK Shell (AGS) to install older version - added aylurs-gtk-shell to uninstall - + ## 20 Sep 2024 + - User will be ask if they want to set Thunar as default file manager if they decided to install it ## 19 Sep 2024 + - Added fastfetch on tty. However, will be disabled if user decided to install pokemon colorscripts ## 18 Sep 2024 + - dotfiles will now be downloaded from main or master branch instead of from the releases version. ## 14 Sep 2024 + - remove the final error checks instead, introduced a final check of essential packages to ran Hyprland ## 08 Sep 2024 + - Added final error checks on install-logs ## 07 Sep 2024 + - added pulseaudio check - added sof-firmware ## 29 Aug 2024 + - switched over to non-git wallust package - improved indentions on some install scripts ## 28 Aug 2024 + - Added final check if hyprland is installed and will give an error to user ## 26 Aug 2024 + - Set to uninstall rofi as conflicts with rofi-wayland - added nvidia_drm.fbdev=1 for grub ## 14 Aug 2024 + - added archlinux-keyring on base.sh ## 08 Aug 2024 + - Increased to 1 sec delay for installing base-devel [commit](https://github.com/JaKooLit/Arch-Hyprland/commit/7ebfa06c3b186f9bec0bcf268fae401ba67dfc2a) ## 07 Jul 2024 + - added eza (ls replacement for tty). Note only on .zshrc ## 25 Jun 2024 + - added fbdev=1 for nvidia.sh on `/etc/modprobe.d/nvidia.conf`. see here `https://wiki.hyprland.org/Nvidia/#drm-kernel-mode-setting` ## 26 May 2024 + - Added fzf for zsh (CTRL R to invoke FZF history) ## 23 May 2024 + - added qalculate-gtk to work with rofi-calc. Default keybinds (SUPER ALT C) - added power-profiles-daemon for ROG laptops. Note, I cant add to all since it conflicts with TLP, CPU-Auto-frequency etc. - added fastfetch ## 22 May 2024 + - nwg-look is now in extra repo so replaced with nwg-look from nwg-look-bin - change the sddm theme destination to /etc/sddm.conf.d/10-theme.conf to theme.conf.user ## 19 May 2024 + - Disabled the auto-login in .zprofile as it causes auto-login to Hyprland if any wayland was chosen. Can enabled if only using hyprland ## 10 May 2024 + - added wallust-git and remove python-pywal for migration to wallust on Hyprland-Dots v2.2.11 ## 08 May 2024 + - Adjusted sddm.sh since it does not respect preset.sh - install.sh have been rearranged so it quits if user choose not to proceed ## 07 May 2024 + - Minor typo change on nvidia.sh - switch back to cava since installing cava-git keep it hanging (see known-issue on readme) ## 05 May 2024 + - switched to rofi-wayland Extra Repo ## 04 May 2024 + - separated fonts installation script for easy debugging ## 03 May 2024 + - added python3-pyquery for new weather-waybar python based on Hyprland-Dots ## 02 May 2024 + - Added pyprland (hyprland plugin) ## 26 Apr 2024 + - Updated sddm.sh for Qt6 variant ## 23 Apr 2024 + - Dropping swayidle and swaylock in favor of hypridle and hyprlock ## 20 Apr 2024 + - Change default Oh-my-zsh theme to xiong-chiamiov-plus ## 16 Mar 2024 + - added hyprcursor ## 1 Mar 2024 + - replaced sddm-git with sddm ## 11 Jan 2024 + - dropped wlsunset ## 05 Jan 2024 + - Added a preset feature - Added templates for contributing, and reporting, etc ## 01 Jan 2024 + - Re-coded complete and test - Added to spice up pacman.conf including adding of ILoveCandy on it :) ## 30 Dec 2023 + - Install scripts reconstructed ## 29 December 2023 + - Remove dunst in favor of swaync. NOTE: Part of the script is to also uninstall mako and dunst (if installed) as on my experience, dunst is sometimes taking over the notification even if it is not set to start ## 16 Dec 2023 + - zsh theme switched to `agnoster` theme by default - pywal tty color change disabled by default ## 13 Dec 2023 + - switched hyprland to Extra Repo hyprland (both nvidia and non-nvidia). Seeing they are updating all the time :) ## 11 Dec 2023 + - Changing over to zsh automatically if user opted - If chose to install zsh and have no login manager, zsh auto login will auto start Hyprland - added as optional, with zsh, pokemon colorscripts - improved zsh install scripts, so even the existing zsh users of can still opt for zsh and oh-my-zsh installation :) ## 03 Dec 2023 + - Added kvantum for qt apps theming - return of wlogout due to theming issues of rofi-power ## 01 Dec 2023 + - Added pipewire to install ## 30 Nov 2023 + - switched to swaylock-effects-git as non-git does not seem to work ## 29 Nov 2023 -- nvidia.sh edited to remove hyprland-nvidia-git as well + +- nvidia.sh edited to remove hyprland-nvidia-git as well ## 26 Nov 2023 + - nvidia - Move to hyprland-git. see [`commit`](https://github.com/hyprwm/Hyprland/commit/cd96ceecc551c25631783499bd92c6662c5d3616) ## 25 Nov 2023 + - drop wlogout since Hyprland-Dots v2.1.9 uses rofi-power ## 23-Nov-2023 + - Added Bibata cursor to install if opted for GTK Themes. However, it is not pre-applied. Use nwg-look utility to apply ## 19-Nov-2023 + - Adjust dotfiles script to download from releases instead of from upstream - - -