Files
Thinkpad-Hyprland-Dotfiles/config/hypr/Scripts/ags-switcher.sh
2026-04-28 03:59:07 +02:00

23 lines
610 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)"
MODE="${1:-wallpaper}"
export HYPR_DIR
export HYPR_SWITCHER_THEME_DIR="$HYPR_DIR/Themes"
export HYPR_SWITCHER_WALLPAPER_DIR="${WALLPAPER_DIR:-$HOME/Bilder/Wallpaper}"
notify() {
notify-send "AGS Switcher" "$1" >/dev/null 2>&1 || true
}
if ! command -v ags >/dev/null 2>&1; then
notify "ags ist nicht installiert."
exit 1
fi
cd "$HYPR_DIR"
ags quit --instance hypr-switcher >/dev/null 2>&1 || true
exec ags run "$HYPR_DIR/ags/switcher.tsx" "$MODE"