An innovative floating window manager for X11 with AR glasses integration.
FloatWM is a floating window manager for X11 that bridges traditional desktop window management with augmented reality. It utilizes sensor data from XReal smart glasses to control window positioning and movement in 3D space, creating an immersive computing environment where the digital workspace responds naturally to physical movement.
- Floating Window Management: Traditional X11 window management with floating/tiling hybrid model
- XReal Glasses Integration: Real-time sensor data integration for spatial window positioning
- Intuitive Controls: Window manipulation through head movement and gestures
- High Performance: Smooth 60fps+ operation with efficient rendering
- Configurable: Flexible configuration system for different user preferences
- Multi-Monitor Support: Independent or coordinated spatial behavior across displays
- Rust toolchain (stable or nightly)
- X11 development libraries (
libx11-dev,libxext-dev,libxrandr-dev) - Linux operating system with X11 server
# Build with default features
cargo build --release
# Build with full features (sensor support + configuration)
cargo build --release --features full
# Build with minimal features
cargo build --release --no-default-features# Run FloatWM
cargo run --release
# Run with specific features
cargo run --release --features full
# Run with debug logging
FLOATWM_LOG_LEVEL=debug cargo run --release
# Run with JSON logging to file
FLOATWM_LOG_FORMAT=json \
FLOATWM_LOG_TARGET=file \
FLOATWM_LOG_FILE=/var/log/floatwm.log \
cargo run --releaseFloatWM includes a comprehensive structured logging system. Configure it via environment variables:
| Variable | Description | Example |
|---|---|---|
FLOATWM_LOG_LEVEL |
Log level (trace, debug, info, warn, error) | debug |
FLOATWM_LOG_FORMAT |
Output format (terminal, json, compact) | json |
FLOATWM_LOG_TARGET |
Output destination (stdout, stderr, file, both) | file |
FLOATWM_LOG_FILE |
Path to log file | /var/log/floatwm.log |
RUST_LOG |
Alternative for log level with module support | floatwm::x11=debug |
For detailed logging documentation, see docs/logging.md
FloatWM uses a TOML configuration file for customization. The default configuration is used if no configuration file is found.
The configuration file is located at:
~/.config/floatwm/floatwm.toml
The path respects the XDG_CONFIG_HOME environment variable.
FloatWM provides example configuration files for common use cases. You can find them in the docs/examples/ directory:
- Basic Setup - Beginner-friendly configuration with sensible defaults
- Multi-Monitor - Optimized for dual/triple monitor setups
- Spatial Gaming - Optimized for gaming with XReal glasses
- Productivity Workflow - Optimized for development and productivity
- Accessibility - Optimized for users with accessibility needs
See the examples README for detailed information about each configuration.
To get started with a basic configuration:
mkdir -p ~/.config/floatwm
cp docs/floatwm.toml.example ~/.config/floatwm/floatwm.tomlOr choose an example that matches your use case:
# For multi-monitor setups
cp docs/examples/multi-monitor.example.toml ~/.config/floatwm/floatwm.toml
# For gaming with XReal glasses
cp docs/examples/spatial-gaming.example.toml ~/.config/floatwm/floatwm.toml
# For productivity/workflow
cp docs/examples/productivity-workflow.example.toml ~/.config/floatwm/floatwm.toml
# For accessibility features
cp docs/examples/accessibility.example.toml ~/.config/floatwm/floatwm.tomlThe configuration file supports:
- Focus Behavior: Control how window focus is managed (click, follow mouse, sloppy)
- Spatial Settings: Configure head tracking sensitivity and smoothing for XReal glasses
- Keybindings: Customize keyboard shortcuts for window management
- Window Rules: Define automatic window placement and behavior based on application
Example configuration:
# Focus behavior: "click", "followmouse", or "sloppy"
focus_behavior = "sloppy"
# Spatial settings for XReal glasses
[spatial_settings]
enabled = true
sensitivity = 1.5
max_range = 150
smoothing = 0.6
# Keybindings
[keybindings]
spawn_terminal = ["Super+Return"]
close_window = ["Super+Shift+q"]
toggle_spatial = ["Super+s"]
# Window rules
[[window_rules]]
class = "Firefox"
float = true
size = [1920, 1080]For detailed configuration documentation, see docs/config_parser.md.
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run benchmarks
cargo bench# Format code
cargo fmt
# Run linter
cargo clippy --all-targets --all-featuresMIT OR Apache-2.0
Contributions are welcome! Please submit pull requests or open issues for bugs and feature requests.