This document provides a technical reference for custom shell scripts in the repository.
- Path:
~/.config/hypr/scripts/wallpaper.sh - Triggered by:
Super + Shift + W - Purpose: Selects a random wallpaper from
hypr/hyprpaper/and synchronizes configuration across daemons. - Execution Flow:
- Finds all
.jpg,.jpeg,.png, and.webpimages in~/.config/hypr/hyprpaper/and picks one usingshuf -n 1. - Finds all
.cssfiles in~/.config/waybar/themes/and picks one randomly. - Uses
sed -ito update the activepath = ...inhypr/hyprpaper.conf. - Uses
sed -ito update the activepath = ...inhypr/hyprlock.conf. - Updates the
@import url("themes/...")directive inwaybar/style.css. - Restarts
hyprpaper(killall hyprpaper && hyprpaper &). - Sends
SIGUSR2to Waybar (killall -SIGUSR2 waybar) to hot-reload CSS without killing the process.
- Finds all
- Path:
~/.config/hypr/scripts/hyprsunset-toggle.sh - Arguments: Optional color temperature (default:
4000). - Purpose: Toggles display warmth between neutral daylight and warm night mode.
- Execution Flow:
- Checks if
hyprsunsetis running; launches it if absent. - Reads state from
${XDG_RUNTIME_DIR:-/tmp}/hyprsunset_state. - If currently
on: runshyprctl hyprsunset identityand sets state tooff. - If currently
off: runshyprctl hyprsunset temperature "$TEMP"and sets state toon.
- Checks if
- Path:
~/.config/hypr/scripts/sysmaintenance.sh - Arguments: Optional
--upgrade(-u) to include a full system upgrade. - Purpose: Interactive, abort-safe housekeeping for Arch Linux systems.
- Execution Flow:
- Detects whether
paruoryayis installed. - Creates timestamped log in
~/.local/var/log/spring-clean-YYYY-MM-DD_HH-MM-SS.log. - (Optional) Executes
$AUR -Syu --ask 4. - Trims pacman package cache with
sudo paccache -vrk2(keeps 2 versions) andsudo paccache -ruk0(purges uninstalled packages). - Detects orphaned packages with
$AUR -Qtdqand prompts for removal viasudo pacman -Rns. - Prunes empty folders and files older than 30 days in
~/.cache. - Vacuums systemd journald logs older than 7 days (
sudo journalctl --vacuum-time=7d). - Scans for failed systemd units using
systemctl --failed.
- Detects whether
- Path:
~/.config/hypr/scripts/waybar-reload.sh - Triggered by:
Super + Shift + R - Purpose: Cleanly terminates and relaunches the Waybar process.
- Execution Flow:
- Executes
pkill -x waybar. - Loops with
sleep 0.1untilpgrep -x waybarconfirms termination. - Spawns a fresh
waybarinstance in the background.
- Executes
status.sh: Queries/sys/class/power_supply/*BAT*/to output remaining battery capacity (N%) and charging indicator ((+)).check-capslock.sh: Querieshyprctl devicesto output"Caps Lock is Active"if the primary keyboard has Caps Lock turned on.notifications.sh: Queriesswaync-client -cto output• N notificationsif unread notifications exist.