XR for Universal Blue and Fedora Atomic Desktops
vr fedora-atomic linux
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add lighthouse calibration function

This is useful for Flatpak Steam users, and people who don't have a
lighthouse-tracked headset but want to use lighthouse body trackers in
WiVRn.

Ref #19

Shiloh Fen dad3bf3e a93bd7e9

+63
+6
README.md
··· 25 25 26 26 ## Usage 27 27 28 + > NOTE: If you plan to use the SteamVR Lighthouse driver with: 29 + > - Flatpak Steam 30 + > - WiVRn without a lighthouse-tracked headset (for example if you want to use lighthouse body trackers, but don't own a lighthouse headset) 31 + > 32 + > ..you'll have to calibrate using AtomicXR instead of Envision: `axr calibrate steamvr-lh` 33 + 28 34 CLI: 29 35 - Configure: `axr icfg` 30 36 - Apply configuration & update applications: `axr apply`
+57
src/atomic-xr/mod.nu
··· 67 67 } 68 68 } 69 69 70 + def "ask yn" [prompt: string] { 71 + loop { 72 + match (input -n 1 $"($prompt) [y/n]: " | str downcase) { 73 + "y" => (return true) 74 + "n" => (return false) 75 + _ => (log error "Invalid option, please choose `y` or `n`.") 76 + } 77 + } 78 + } 79 + 80 + # SteamVR Quick Calibration 81 + export def "calibrate steamvr-lh" [] { 82 + if (ask yn "Do you own a lighthouse-tracked HMD? (e.g. Index, Vive Pro)") { 83 + input -sn 1 "Please connect your headset and place it on the floor, then press any key to start the calibration." 84 + 85 + log info "Starting SteamVR Lighthouse calibration" 86 + 87 + # TODO: Support using native steam installation 88 + log warning "This is intended for Flatpak Steam, if you're using native Steam, please use Envision instead." 89 + log warning "If you'd like to see this functionality in AtomicXR, please open an issue on Codeberg." 90 + 91 + let vrcmd_bin: path = $"($env.HOME)/.steam/root/steamapps/common/SteamVR/bin/linux64/vrcmd" 92 + let environment = $"LD_LIBRARY_PATH=('~/.var/app/com.valvesoftware.Steam/.steam/root/steamapps/common/SteamVR/bin/linux64' | path expand)" 93 + 94 + let server = job spawn {flatpak run --command=$"($vrcmd_bin)" --env=$"($environment)" com.valvesoftware.Steam --pollposes} 95 + sleep 2sec # TODO: detect when the server is ready 96 + try { 97 + flatpak run --command=$"($vrcmd_bin)" --env=$"($environment)" com.valvesoftware.Steam --resetroomsetup 98 + } catch {|err| 99 + job kill $server 100 + error make $err 101 + } 102 + 103 + job kill $server 104 + log info "Calibration finished" 105 + } else { 106 + log info "Creating default Lighthouse Database" 107 + 108 + if not ("~/.steam/root/config/lighthouse/" | path exists) { 109 + error make { 110 + msg: "Could not find lighthouse configuration directory." 111 + help: "Make sure you have SteamVR installed, and .steam points to the correct location. You may need to select \"Symlink .steam directory\" in `axr icfg` if you're using the Steam Flatpak." 112 + } 113 + } 114 + 115 + { 116 + base_stations: [] 117 + known_objects: [] 118 + known_universes: [] 119 + revision: 1 120 + } 121 + | save -f ~/.steam/root/config/lighthouse/lighthousedb.json 122 + 123 + log info "Created default Lighthouse Database" 124 + } 125 + } 126 + 70 127 # Apply current configuration (and update applications) 71 128 export def apply [ 72 129 --sysconfigs-only (-s)