Hypr (desktop): add hypridle and dependency hints
This commit is contained in:
8
.config/hypr/README.md
Normal file
8
.config/hypr/README.md
Normal 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.
|
@@ -8,3 +8,4 @@ exec-once = ~/.config/waybar/scripts/hyprsunset_daemon.sh
|
|||||||
|
|
||||||
exec-once = hyprpaper -c $HOME/.config/hyprpaper.conf
|
exec-once = hyprpaper -c $HOME/.config/hyprpaper.conf
|
||||||
exec-once = swayosd-server
|
exec-once = swayosd-server
|
||||||
|
exec-once = hypridle
|
||||||
|
89
.config/hypr/scripts/check-deps.sh
Executable file
89
.config/hypr/scripts/check-deps.sh
Executable 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
|
Reference in New Issue
Block a user