mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 21:23:02 +01:00
* Rename voice-control to hex everywhere, without migrations The Cargo package and binary are now hex, every OS keeps its data in a hex folder, and VOICE_CONTROL_* variables are HEX_*. Hex is a fresh app: the macOS voice-control rename, its symlink, and the Windows and Linux beta settings imports are gone. The Windows installer gets a new AppId so it never takes over an old voice-control install's entry. * Format * Drop the Windows paste-last default only the beta import used
21 lines
691 B
Shell
21 lines
691 B
Shell
for ((attempt = 0; attempt < 30; attempt++)); do
|
|
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
|
|
case "$WAYLAND_DISPLAY" in
|
|
/*) socket="$WAYLAND_DISPLAY" ;;
|
|
*) socket="${XDG_RUNTIME_DIR:-/nonexistent}/$WAYLAND_DISPLAY" ;;
|
|
esac
|
|
if [[ -S "$socket" ]]; then
|
|
exit 0
|
|
fi
|
|
elif [[ -n "${DISPLAY:-}" ]]; then
|
|
# graphical-session.target can precede the window manager on NixOS/i3.
|
|
if xprop -root _NET_SUPPORTING_WM_CHECK 2>/dev/null |
|
|
grep -Eq 'window id # 0x0*[1-9a-fA-F][0-9a-fA-F]*'; then
|
|
exit 0
|
|
fi
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
echo "Hex: no ready graphical session. Import its display environment into the systemd user manager; retrying." >&2
|
|
exit 1
|