diff --git a/display-settings/ft-display-settings.desktop b/display-settings/ft-display-settings.desktop index 7ced2e7..63bade7 100644 --- a/display-settings/ft-display-settings.desktop +++ b/display-settings/ft-display-settings.desktop @@ -3,7 +3,7 @@ Type=Application Name=Frametop Display Settings GenericName=Screens and layout for the VR desktop Comment=Number of screens, resolution, scale, and where they float around you -Exec=@REPO@/frametop/display-settings/ft-display-settings +Exec=@REPO@/display-settings/ft-display-settings Icon=video-display Categories=Settings;HardwareSettings; Keywords=display;screen;monitor;resolution;layout;arrange;steamvr;frametop; diff --git a/display-settings/ft-layout-reset.desktop b/display-settings/ft-layout-reset.desktop index 74e541e..29f7eab 100644 --- a/display-settings/ft-layout-reset.desktop +++ b/display-settings/ft-layout-reset.desktop @@ -3,7 +3,7 @@ Type=Application Name=Reset Screen Layout GenericName=Put the VR desktop's screens back in their layout Comment=Float the screens and arrange them in the layout from Frametop Display Settings -Exec=@REPO@/frametop/layout/ft-layout apply +Exec=@REPO@/layout/ft-layout apply Icon=view-restore Categories=Settings; Keywords=display;screen;layout;arrange;reset;steamvr;frametop; diff --git a/display-settings/ft-screens-toggle.desktop b/display-settings/ft-screens-toggle.desktop index d9886f1..39e880e 100644 --- a/display-settings/ft-screens-toggle.desktop +++ b/display-settings/ft-screens-toggle.desktop @@ -3,7 +3,7 @@ Type=Application Name=Hide/Show Screens GenericName=Hide or show the VR desktop's screens Comment=Hide the screens (and SteamVR's laser) for a VR game; press again to bring them back -Exec=@REPO@/frametop/layout/ft-layout toggle +Exec=@REPO@/layout/ft-layout toggle Icon=view-visible Categories=Settings; Keywords=display;screen;hide;show;steamvr;frametop; diff --git a/input-settings/ft-input-settings.desktop b/input-settings/ft-input-settings.desktop index 5cae080..b90e3af 100644 --- a/input-settings/ft-input-settings.desktop +++ b/input-settings/ft-input-settings.desktop @@ -3,7 +3,7 @@ Type=Application Name=Frametop Input Settings GenericName=Mouse and keyboard settings for the 3D pointer Comment=Choose and map Bluetooth mice and keyboards for the SteamVR 3D pointer -Exec=@REPO@/frametop/input-settings/ft-input-settings +Exec=@REPO@/input-settings/ft-input-settings Icon=input-mouse Categories=Settings;HardwareSettings; Keywords=mouse;pointer;bluetooth;keyboard;steamvr;frametop; diff --git a/input/frametop-input-relay.service b/input/frametop-input-relay.service index 56aaa55..72ffc18 100644 --- a/input/frametop-input-relay.service +++ b/input/frametop-input-relay.service @@ -1,7 +1,7 @@ # Template: the installer replaces @REPO@ with the repo path on the Frame. [Unit] Description=Frametop input relay: stable virtual mouse and keyboard for SteamVR -Documentation=file://@REPO@/frametop/README.md +Documentation=file://@REPO@/README.md # SteamVR opens input devices only at startup, so the virtual devices must exist first. Before=steamvr.service @@ -9,7 +9,7 @@ Before=steamvr.service # READY=1 is sent only after the virtual devices exist. Type=notify NotifyAccess=main -ExecStart=/usr/bin/python3 @REPO@/frametop/input/input-relay.py +ExecStart=/usr/bin/python3 @REPO@/input/input-relay.py Restart=on-failure RestartSec=1 # systemd holds the virtual devices' file descriptors across relay restarts, diff --git a/pointer/helper/frametop-pointer.service b/pointer/helper/frametop-pointer.service index 3bc96dd..2f3363c 100644 --- a/pointer/helper/frametop-pointer.service +++ b/pointer/helper/frametop-pointer.service @@ -1,7 +1,7 @@ # Template: the installer replaces @REPO@ with the repo path on the Frame. [Unit] Description=Frametop pointer helper: the universal 3D mouse (cursor, collision, ft_pointer driver) -Documentation=file://@REPO@/frametop/README.md +Documentation=file://@REPO@/README.md # Needs SteamVR's IPC; it starts and stops with SteamVR. After=steamvr.service frametop-input-relay.service PartOf=steamvr.service @@ -10,7 +10,7 @@ PartOf=steamvr.service # Runs in the dev container (built there against its libraries). The helper process # lives in the container, so clean it up explicitly around distrobox enter. ExecStartPre=-/usr/bin/pkill -x ft-pointer -ExecStart=%h/.local/bin/distrobox enter dev -- @REPO@/frametop/pointer/helper/build/ft-pointer +ExecStart=%h/.local/bin/distrobox enter dev -- @REPO@/pointer/helper/build/ft-pointer ExecStopPost=-/usr/bin/pkill -x ft-pointer Restart=on-failure RestartSec=3 diff --git a/pointer/helper/run.sh b/pointer/helper/run.sh index 7728d76..60533c1 100755 --- a/pointer/helper/run.sh +++ b/pointer/helper/run.sh @@ -14,8 +14,10 @@ case ${1:-status} in "$root/scripts/sync.sh" >/dev/null fill_template "$root/pointer/helper/$unit" | on_frame "mkdir -p ~/.config/systemd/user && cat > ~/.config/systemd/user/$unit" "$frame" --host "set -e; pkill -x ft-pointer || true -systemctl --user daemon-reload; systemctl --user enable --now $unit; sleep 3 -systemctl --user is-active $unit; tail -n 3 /dev/null; journalctl --user -u $unit --no-pager -o cat -n 3" ;; +systemctl --user daemon-reload; systemctl --user enable --now $unit +# It comes up once SteamVR runs (it starts with it); distrobox enter takes a few seconds. +for i in \$(seq 20); do systemctl --user is-active --quiet $unit && break; sleep 1; done +echo \"$unit: \$(systemctl --user is-active $unit)\"; journalctl --user -u $unit --no-pager -o cat -n 3" ;; 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) if installed; then "$frame" --host "systemctl --user $1 $unit; systemctl --user is-active $unit"; exit; fi ;;& log) if installed; then "$frame" --host "journalctl --user -u $unit --no-pager -o cat -n ${2:-30}"; exit; fi ;;&