Files
Omeron/dotfiles/hypr/Scripts/homelab-control.sh

26 lines
664 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
HYPR_DIR="$(cd -- "$SCRIPT_DIR/.." && pwd)"
HOMELAB_CONFIG="${HOMELAB_CONFIG:-$HOME/.config/homelab/config.yaml}"
notify() {
notify-send "Homelab" "$1" >/dev/null 2>&1 || true
}
if ! command -v ags >/dev/null 2>&1; then
notify "ags ist nicht installiert."
exit 1
fi
if ! command -v sshpass >/dev/null 2>&1; then
notify "sshpass wird benötigt. Bitte installieren: sudo pacman -S sshpass"
exit 1
fi
export HOMELAB_CONFIG
cd "$HYPR_DIR"
ags quit --instance homelab-control >/dev/null 2>&1 || true
exec ags run "$HYPR_DIR/ags/homelab.tsx"