Files
dashboard/install.sh
Francisco 7b2949e739 Initial commit: conky dashboard + DogeBot
Three conky panels (main, dayz, doge) plus all widgets, NUT config templates,
and the systemd timer that drives the qwen2.5:1.5b vibe report on maeth-storage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 01:16:54 -04:00

46 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Symlink configs from this repo into ~/.config/{conky,home-assistant-energy-widget,systemd/user}.
# Existing files are backed up as <path>.bak before being replaced.
set -euo pipefail
REPO="$(cd "$(dirname "$0")" && pwd)"
declare -A MAP=(
["$REPO/conky"]="$HOME/.config/conky"
["$REPO/widgets"]="$HOME/.config/home-assistant-energy-widget"
["$REPO/systemd/user"]="$HOME/.config/systemd/user"
)
link_one() {
local src="$1" dst="$2"
if [[ -L "$dst" && "$(readlink -f "$dst")" == "$(readlink -f "$src")" ]]; then
return
fi
if [[ -e "$dst" || -L "$dst" ]]; then
mv -v "$dst" "$dst.bak.$(date +%Y%m%d%H%M%S)"
fi
mkdir -p "$(dirname "$dst")"
ln -sv "$src" "$dst"
}
for src_root in "${!MAP[@]}"; do
dst_root="${MAP[$src_root]}"
mkdir -p "$dst_root"
while IFS= read -r -d '' src; do
rel="${src#$src_root/}"
case "$rel" in
env|*.bak|*.bak.*|__pycache__/*) continue ;;
esac
link_one "$src" "$dst_root/$rel"
done < <(find "$src_root" -type f -print0)
done
echo
echo "Done. Things you still need to do manually:"
echo " 1. cp widgets/env.example ~/.config/home-assistant-energy-widget/env (then fill it in)"
echo " 2. ~/.udm → username= / password= for the UDM-SE local admin"
echo " 3. Install Twemoji Mozilla font (see README)"
echo " 4. systemctl --user daemon-reload"
echo " 5. systemctl --user enable --now vibe-report.timer"
echo " 6. (optional) sudo bash widgets/setup-ups.sh for the Hikvision UPS"