···1717export def calibrate [] {
1818 # TODO: Support using native steam installation
1919 log warning "This is intended for Flatpak Steam, if you're using native Steam, please use Envision instead."
2020- log warning "If you'd like to see native Steam functionality in AtomicXR, please open an issue on Tangled."
2020+ log warning "If you'd like to use this feature with native Steam, please open an issue on Tangled."
21212222 if (ask yn "Do you own a lighthouse-tracked HMD? (e.g. Index, Vive Pro)") {
2323 input -sn 1 "Please connect your headset and place it on the floor, then press any key to start the calibration."
···4444 if not ("~/.steam/root/config/lighthouse/" | path exists) {
4545 error make {
4646 msg: "Could not find lighthouse configuration directory."
4747- 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."
4747+ help: "Make sure you have SteamVR installed, and .steam points to the correct location. You may need to run `axr flatpak steam enable-xr` if you're using the Steam Flatpak."
4848 }
4949 }
5050···6060 }
6161}
62626363+# Run lighthouse console natively or via flatpak depending on which is installed
6464+def lh-console [...args]: any -> any {
6565+ if (which lighthouse_console | length) > 0 {
6666+ log debug "Running lighthouse_console from PATH"
6767+ run-external lighthouse_console
6868+ } else if not ("~/.steam" | path exists) and (
6969+ "~/.var/app/com.valvesoftware.Steam/.steam/root/steamapps/common/SteamVR/tools/lighthouse/bin/linux64/lighthouse_console"
7070+ | path exists
7171+ ) or (ls -lD ~/.steam).0.target == ("~/.var/app/com.valvesoftware.Steam/.steam/" | path expand) {
7272+ log debug "Running lighthouse_console from steam flatpak"
7373+ flatpak run --command=$"($env.HOME)/.var/app/com.valvesoftware.Steam/.steam/root/steamapps/common/SteamVR/tools/lighthouse/bin/linux64/lighthouse_console" com.valvesoftware.Steam ...$args
7474+ } else if ("~/.steam" | path exists) {
7575+ log debug "Running lighthouse_console from steam native"
7676+ run-external $"($env.HOME)/.steam/root/steamapps/common/SteamVR/tools/lighthouse/bin/linux64/lighthouse_console" ...$args
7777+ } else {
7878+ error make {
7979+ msg: "Could not find lighthouse_console"
8080+ help: "Please make sure SteamVR is installed"
8181+ }
8282+ }
8383+}
8484+6385# Open SteamVR's lighthouse_console
6486#
6587# Useful for pairing, dumping device configs, etc.
6688export def console [
6789 ...args # Arguments to pass to lighthouse_console
6890] {
6969- # TODO: Support using native steam installation
7070- log warning "This is intended for Flatpak Steam, if you're using native Steam, please use Envision instead."
7171- log warning "If you'd like to see this functionality in AtomicXR, please open an issue on Tangled."
7272-7373- flatpak run --command=$"($env.HOME)/.steam/root/steamapps/common/SteamVR/tools/lighthouse/bin/linux64/lighthouse_console" com.valvesoftware.Steam ...$args
9191+ lh-console ...$args
7492}