mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 07:00:14 +02:00
ft-gazed runs ft-gaze, drops blinks and dropouts, smooths with a fixation lock, applies the probe's calibration plus what the pointer has taught since, and sends the corrected gaze to the pointer helper at 90 Hz. The helper sends lessons back (a nudge before a click), which are learned and saved. It only reads the eye tracker; nothing of SteamVR's is written. gaze/run.sh installs it as a user service that starts with SteamVR; ft-gazectl turns gaze mode on and off and shows the service's status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.4 KiB
Bash
Executable File
23 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Install, start, stop, or inspect the gaze service (ft-gazed) on the Frame.
|
|
# Usage: gaze/run.sh install|uninstall # user service, starts with SteamVR
|
|
# gaze/run.sh start|stop|restart|status|log [lines]
|
|
set -euo pipefail
|
|
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
. "$root/scripts/_env.sh"
|
|
frame="$root/scripts/frame.sh"
|
|
unit=frametop-gaze.service
|
|
case ${1:-status} in
|
|
install)
|
|
"$root/gaze/build.sh"
|
|
fill_template "$root/gaze/$unit" | on_frame "mkdir -p ~/.config/systemd/user && cat > ~/.config/systemd/user/$unit"
|
|
on_frame "chmod +x gaze/ft-gazed gaze/ft-gazectl"
|
|
"$frame" --host "set -e; systemctl --user daemon-reload; systemctl --user enable --now $unit
|
|
sleep 2; echo \"$unit: \$(systemctl --user is-active $unit)\"; journalctl --user -u $unit --no-pager -o cat -n 5" ;;
|
|
uninstall) "$frame" --host "systemctl --user disable --now $unit 2>/dev/null; rm -f ~/.config/systemd/user/$unit; systemctl --user daemon-reload; echo removed" ;;
|
|
start|stop|restart) "$frame" --host "systemctl --user $1 $unit; systemctl --user is-active $unit" ;;
|
|
status) "$frame" --host "systemctl --user is-active $unit" || true; on_frame "gaze/ft-gazectl status" || true ;;
|
|
log) "$frame" --host "journalctl --user -u $unit --no-pager -o cat -n ${2:-30}" ;;
|
|
*) echo "usage: $0 install|uninstall|start|stop|restart|status|log" >&2; exit 2 ;;
|
|
esac
|