a very simple cli to set your floor level in monado
  • Rust 69.4%
  • Shell 30.6%
Find a file
2026-04-02 01:36:57 +02:00
src feat: implement basic floor level commands 2026-04-01 22:32:32 +02:00
.gitignore chore: rust project with libmonado example 2026-04-01 21:38:42 +02:00
Cargo.lock feat: implement basic floor level commands 2026-04-01 22:32:32 +02:00
Cargo.toml feat: implement basic floor level commands 2026-04-01 22:32:32 +02:00
LICENSE.md chore: write some basic readme 2026-04-01 22:49:33 +02:00
PKGBUILD feat: add pkgbuild for easy building 2026-04-01 23:07:19 +02:00
README.md feat: wayvr usage example 2026-04-02 01:36:57 +02:00

floorlevel cli

A very simple CLI to set the floor level for Monado, the linux OpenXR runtime (and forks like WiVRn). This CLI can be used to quickly script things to automate your vr setup.

The heavy lifting here is already done by libmonado and the respective rust bindings. Have a look at src/main.rs to see how simple this really is!

usage

In general, the CLI should be self explanatory. Have a look at the help page to get started. Still, here are a few commands the CLI currently supports:

# print the current floor level
floorlevel get

# set the floor level to an absolute value of 69cm
floorlevel set 0.69

# lift and lower the floorlevel by 5cm
floorlevel modify 0.05
floorlevel modify -- -0.05

The absolute values are usually relative to your tracking origin.

wayvr example

As a quick example, here are a few widgets which you can add to your WayVR watch to store and load a specific floor level (FL) for certain use cases. If your tracking origin doesn't change between sessions, this should even persist accross them. To adjust the FL to new heights, you can still use WayVR's inbuilt floor level tool. So as a quick usage:

  1. Set an FL using WayVR's "fix floor" tool
  2. Save the current FL for a button by right clicking it (orange laser)
  3. At any later point in time, load the FL instantly by clicking on the button

To get started, you can refer to an excerpt from my WayVR config:

<!-- this template can be used to define a floor-level button -->
<template name="FloorLevel">
    <Button
        id="level_bed" macro="button_style" tooltip_side="left"
        _press_left="::ShellExec floorlevel set $(cat ~/.config/wayvr/${id}-level.txt)"
        _press_right="::ShellExec floorlevel get > ~/.config/wayvr/${id}-level.txt" tooltip_str="Set floor level to ${name}"
    >
        <sprite src="${icon}" width="24" height="24" />
    </Button>
</template>

<!-- for example for three different floor level buttons -->
<div flex_direction="row" gap="8">
    <div flex_direction="column" gap="8">
        <FloorLevel icon="<path-to-bed-icon>" name="Bed" id="bed"/>
        <FloorLevel icon="<path-to-chair-icon>" name="Chair" id="chair"/>
        <FloorLevel icon="<path-to-floor-icon>" name="Floor" id="floor"/>
    </div>
</div>

installation

To install this CLI, you can clone this repository and build it locally, then place the binary from target/release/floorlevel-cli into your path.

cargo build --release

Alternatively, if you are on Arch Linux, you can use the PKGBUILD in this repository.

license

This project is licensed under the GNU General Public License (Version 3). Refer to the LICENSE.md file for more information.