[Sync] Lua Hyprland chain, licence cleanup

This commit is contained in:
Coja committed 2026-11-09 18:25:35 +01:00
1 parent 93b4f695ce
commit 47166d877f
183 files changed
+5618 -5839

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# dots-icons-link.sh — fill the dots-icons overlay theme with symlinks into the host's own
# Tela-circle-dracula install (HyDE ships that icon theme on every GUI host).
#
# The overlay (gui/.local/share/icons/dots-icons/index.theme, searched before Tela) exists
# because Tela ships its flat tray/status icons only at fixed 16/22/24px. On a fractionally
# scaled monitor waybar asks for size×2 (44px), which falls through to Tela's coloured
# scalable/devices circles (the blue nm-applet blob). Serving Tela's 22/panel SVGs as
# Scalable keeps them flat at every size.
#
# Links, not copies: Tela-circle publishes no licence (2026-11-09), so the repo can't
# redistribute its SVGs. Each host links its own installed files instead.
#
# Usage: bin/dots-icons-link.sh [-n] (-n = dry run). Idempotent; ./install.sh runs it on
# GUI hosts. Exit 1 if Tela is missing or any icon could not be linked — the overlay then
# degrades gracefully (Inherits=Tela-circle-dracula), so callers treat that as a warning.
set -euo pipefail
DRY=0
[ "${1:-}" = "-n" ] && DRY=1
data="${XDG_DATA_HOME:-$HOME/.local/share}"
src="$data/icons/Tela-circle-dracula/22/panel"
dst="$data/icons/dots-icons/scalable/status"
icons=(
blueman-active blueman-disabled blueman-tray-active blueman-tray-disabled blueman-tray
nm-adhoc nm-device-wired-autoip nm-device-wired-secureoffline nm-device-wired-secure
nm-device-wired nm-device-wireless nm-device-wwan nm-mb-roam nm-nm-signal-00
nm-nm-signal-100 nm-nm-signal-25 nm-nm-signal-50 nm-nm-signal-75 nm-no-connection
nm-secure-lock nm-signal-00-secure nm-signal-00 nm-signal-0-secure nm-signal-0
nm-signal-100-secure nm-signal-100 nm-signal-25-secure nm-signal-25 nm-signal-50-secure
nm-signal-50 nm-signal-75-secure nm-signal-75 nm-tech-3g nm-tech-4g nm-tech-cdma-1x
nm-tech-edge nm-tech-evdo nm-tech-gprs nm-tech-hspa nm-tech-lte nm-tech-umts
nm-vpn-active-lock nm-vpn-lock nm-vpn-standalone-lock nm-wwan-tower
)
if [ ! -d "$src" ]; then
echo " dots-icons: $src missing — Tela-circle-dracula not installed; overlay left empty" >&2
exit 1
fi
[ "$DRY" = 1 ] || mkdir -p "$dst"
linked=0 ok=0 bad=0
for n in "${icons[@]}"; do
s="$src/$n.svg" d="$dst/$n.svg"
if [ ! -e "$s" ]; then
echo " dots-icons: $n.svg not in Tela-circle-dracula/22/panel (renamed upstream?)" >&2
bad=$((bad + 1))
elif [ -L "$d" ] && [ "$(readlink "$d")" = "$s" ]; then
ok=$((ok + 1))
elif [ -e "$d" ] && [ ! -L "$d" ]; then
echo " dots-icons: $d is a real file — left alone" >&2
bad=$((bad + 1))
else
[ "$DRY" = 1 ] || ln -sfn "$s" "$d"
linked=$((linked + 1))
fi
done
verb="linked"
[ "$DRY" = 1 ] && verb="would link"
echo " dots-icons: $verb $linked, $ok already linked, $bad problem(s)"
[ "$bad" -eq 0 ]
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env bash
# dots-themes-fetch.sh — download the third-party theme files this repo's configs use but the
# repo doesn't ship. Each host fetches its own copy from upstream, so the repo redistributes
# nothing and needs no licence notice. (Same idea as bin/dots-icons-link.sh, which links Tela's
# icons from the host instead of shipping them.)
#
# Every entry is pinned to an upstream commit plus a sha256, so a fetch is exactly the file
# that was reviewed. To update one: bump the commit in the URL, check the diff, then replace
# the checksum with `curl -fsSL <url> | sha256sum`.
#
# Usage: bin/dots-themes-fetch.sh [-n] (-n = dry run). Idempotent; ./install.sh runs it on
# every host. A destination that's already a real file is left alone, even if its content
# differs (a local edit wins). A symlink there (e.g. the stow link left dangling after the
# repo dropped the file) is replaced: mv swaps the link itself, never writes through it.
# Exit 1 if a download or checksum failed; the app then falls back to its built-in theme, so
# install.sh only warns.
set -euo pipefail
DRY=0
[ "${1:-}" = "-n" ] && DRY=1
cfg="${XDG_CONFIG_HOME:-$HOME/.config}"
# dest|sha256|url
themes=(
# aichat: One Half Dark by Son A. Pham (MIT), loaded as <config>/dark.tmTheme when present
"$cfg/aichat/dark.tmTheme|6205e2311e433841f0aa1b15862b46cb892b003650f31df508a4ebc39a27bdbb|https://raw.githubusercontent.com/sonph/onehalf/d13f47b0c20923eb13335f7effc5e8ec4431a5cd/sublimetext/OneHalfDark.tmTheme"
)
fetched=0 ok=0 kept=0 bad=0
for t in "${themes[@]}"; do
IFS='|' read -r dst sum url <<<"$t"
name="$dst"
case "$dst" in "$HOME"/*) name="~${dst#"$HOME"}" ;; esac
if [ ! -d "$(dirname "$dst")" ]; then
echo " themes: $name skipped (app not configured on this host)"
continue
fi
if [ -f "$dst" ] && [ ! -L "$dst" ]; then
if [ "$(sha256sum <"$dst" | cut -d' ' -f1)" = "$sum" ]; then
ok=$((ok + 1))
else
echo " themes: $name is a real file with other content — left alone"
kept=$((kept + 1))
fi
continue
fi
if [ "$DRY" = 1 ]; then
echo " themes: would fetch $name"
fetched=$((fetched + 1))
continue
fi
tmp="$(mktemp "$dst.XXXXXX")"
if curl -fsSL --connect-timeout 5 --max-time 30 "$url" -o "$tmp" \
&& [ "$(sha256sum <"$tmp" | cut -d' ' -f1)" = "$sum" ]; then
chmod 644 "$tmp"
mv -f "$tmp" "$dst"
fetched=$((fetched + 1))
else
rm -f "$tmp"
echo " themes: could not fetch $name (offline, or the checksum changed) — app uses its built-in theme" >&2
bad=$((bad + 1))
fi
done
verb="fetched"
[ "$DRY" = 1 ] && verb="would fetch"
echo " themes: $verb $fetched, $ok already present, $kept kept as local, $bad problem(s)"
[ "$bad" -eq 0 ]