Dotfiles/desktopenvs/hyprdrive/scripts/beacon-start.sh

14 lines
531 B
Bash

#!/usr/bin/env bash
# Resident launcher for beacon, the Cosmonaut Shell notification daemon (replaces
# dunst). Same LD_PRELOAD requirement and rationale as the rest of the suite's
# start scripts: gtk4-layer-shell must load before libwayland-client, which isn't
# guaranteed under PyGObject.
APP="${HOME}/.config/beacon/main.py"
SO="$(ldconfig -p 2>/dev/null | awk '/libgtk4-layer-shell\.so/ {print $NF; exit}')"
if [[ -n "${SO:-}" ]]; then
export LD_PRELOAD="${SO}${LD_PRELOAD:+:${LD_PRELOAD}}"
fi
exec python3 "$APP" "$@"