Files
taninux/packaging/tanin-greet/install-local.sh
T
karim 10b88a67bc Initial commit — TANINUX (camel): management app + distro packaging
- app: GTK System Settings (tsettings) + Software Hub (thub) + TUI
- distro/: camel.toml manifest + MANIFEST.md (Arch + [tanin] repo model)
- packaging/: taninux, tanin-desktop (niri metapackage), tanin-greet,
  tanin-libadwaita, tanin-setup
- docs/, data/, LICENSE (GPL-3.0-or-later)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 20:18:30 +02:00

34 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# Install tanin-greet as the greetd greeter on THIS machine. Run with sudo:
# sudo bash packaging/tanin-greet/install-local.sh
# Reversible: the current greetd config is backed up first.
set -euo pipefail
SRC="$(cd "$(dirname "$0")" && pwd)"
ts="$(date +%Y%m%d-%H%M%S)"
# 1) greeter binary + stylesheet
install -Dm755 "$SRC/tanin-greet" /usr/bin/tanin-greet
install -Dm644 "$SRC/tanin-greet.css" /etc/greetd/tanin-greet.css
# 2) optional login wallpaper (greeter falls back to a dark scrim if absent)
if [ -f "${TANIN_LOGIN_BG:-}" ]; then
install -Dm644 "$TANIN_LOGIN_BG" /usr/share/backgrounds/tanin/login.jpg
fi
# 3) point greetd at tanin-greet (back up the working config first)
[ -f /etc/greetd/config.toml ] && cp -a /etc/greetd/config.toml "/etc/greetd/config.toml.bak-$ts"
install -Dm644 "$SRC/config.toml" /etc/greetd/config.toml
cat <<EOF
tanin-greet installed.
greeter: /usr/bin/tanin-greet
css: /etc/greetd/tanin-greet.css
greetd: /etc/greetd/config.toml -> cage -s -- tanin-greet
backup: /etc/greetd/config.toml.bak-$ts
greetd is already enabled — it shows on the NEXT login. To see it now: log out
(or 'sudo systemctl restart greetd' from a TTY — Ctrl+Alt+F2).
If anything is wrong, switch to a TTY and revert:
sudo cp /etc/greetd/config.toml.bak-$ts /etc/greetd/config.toml
EOF