Hypr (desktop): add hypridle and dependency hints

This commit is contained in:
2025-09-22 14:55:31 +02:00
parent 8661a0ebf3
commit 8d2d53f9d6
3 changed files with 98 additions and 0 deletions

8
.config/hypr/README.md Normal file
View File

@@ -0,0 +1,8 @@
Hyprland setup helpers
======================
Dependency check
----------------
Run `scripts/check-deps.sh` to list commands this configuration expects.
The script exits with status 1 if a required command is missing and prints
optional tools separately.

View File

@@ -8,3 +8,4 @@ exec-once = ~/.config/waybar/scripts/hyprsunset_daemon.sh
exec-once = hyprpaper -c $HOME/.config/hyprpaper.conf
exec-once = swayosd-server
exec-once = hypridle

View File

@@ -0,0 +1,89 @@
#!/usr/bin/env bash
# check-deps.sh — report missing commands used by this Hyprland setup
# Usage: ./scripts/check-deps.sh
set -euo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
repo_root="${script_dir%/scripts}"
header() {
printf '\n== %s ==\n' "$1"
}
info() { printf ' - %s\n' "$1"; }
required=(
'uwsm|launch wrapper used for apps'
'swaync|notification daemon'
'swaync-client|notification control client'
'waybar|status bar'
'xsettingsd|XSettings bridge for GTK apps'
'hyprpaper|wallpaper daemon'
'hypridle|idle manager'
'hyprlock|lock screen'
'hyprctl|Hyprland control tool'
'hyprsunset|color temperature daemon'
'swayosd-server|overlay indicators'
'swayosd-client|volume/brightness OSD client'
'playerctl|media key handler'
'wpctl|PipeWire volume control'
'grimblast|screenshot helper'
'kitty|default terminal emulator'
'nautilus|default file manager'
)
optional=(
'sunwait|enables real sunrise/sunset scheduling for hyprsunset'
'brightnessctl|required on laptop for idle dimming'
'nm-applet|NetworkManager tray (laptop)'
'blueman-applet|Bluetooth tray (laptop)'
'clipman|clipboard history for wl-paste hook'
'wl-paste|clipboard watcher utility'
'sherlock|launcher binding'
'uuctl|uwsm controller binding'
'emote|emoji picker binding'
'satty|grimblast editor when building from source'
)
missing_required=()
missing_optional=()
check_list() {
local -n list=$1
local -n missing=$2
local entry cmd desc
for entry in "${list[@]}"; do
IFS='|' read -r cmd desc <<<"$entry"
if ! command -v "$cmd" >/dev/null 2>&1; then
missing+=("$cmd|$desc")
fi
done
}
check_list required missing_required
check_list optional missing_optional
header "Required commands"
if ((${#missing_required[@]}==0)); then
info "all required commands found"
else
for entry in "${missing_required[@]}"; do
IFS='|' read -r cmd desc <<<"$entry"
info "missing: $cmd ($desc)"
done
fi
header "Optional commands"
if ((${#missing_optional[@]}==0)); then
info "all optional commands found"
else
for entry in "${missing_optional[@]}"; do
IFS='|' read -r cmd desc <<<"$entry"
info "missing: $cmd ($desc)"
done
fi
if ((${#missing_required[@]})); then
exit 1
fi