Skip to content

linjoe2/floatwm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FloatWM

GitHub License

An innovative floating window manager for X11 with AR glasses integration.

Overview

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.

Features

  • 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

Building

Prerequisites

  • Rust toolchain (stable or nightly)
  • X11 development libraries (libx11-dev, libxext-dev, libxrandr-dev)
  • Linux operating system with X11 server

Build Instructions

# 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

Usage

# 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 --release

Logging Configuration

FloatWM 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

Configuration

FloatWM uses a TOML configuration file for customization. The default configuration is used if no configuration file is found.

Configuration File Location

The configuration file is located at:

~/.config/floatwm/floatwm.toml

The path respects the XDG_CONFIG_HOME environment variable.

Creating a Configuration File

FloatWM provides example configuration files for common use cases. You can find them in the docs/examples/ directory:

Example Configurations

See the examples README for detailed information about each configuration.

Quick Start

To get started with a basic configuration:

mkdir -p ~/.config/floatwm
cp docs/floatwm.toml.example ~/.config/floatwm/floatwm.toml

Or 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.toml

Configuration Options

The 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.

Development

Running Tests

# Run all tests
cargo test

# Run tests with output
cargo test -- --nocapture

# Run benchmarks
cargo bench

Code Quality

# Format code
cargo fmt

# Run linter
cargo clippy --all-targets --all-features

License

MIT OR Apache-2.0

Contributing

Contributions are welcome! Please submit pull requests or open issues for bugs and feature requests.

About

FloatWM - An innovative floating window manager for X11 with AR glasses integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors