Skip to content

Latest commit

 

History

History
270 lines (207 loc) · 6.81 KB

File metadata and controls

270 lines (207 loc) · 6.81 KB

FloatWM Configuration Examples

This directory contains example configuration files for FloatWM, organized by common use cases. Each configuration file is extensively documented with detailed comments explaining every setting.

Available Examples

Beginner-friendly configuration with sensible defaults

Perfect for:

  • New users getting started with FloatWM
  • Users who want a simple, functional setup
  • Learning FloatWM configuration options

Key features:

  • Sensible defaults for focus behavior and keybindings
  • Spatial mode disabled (opt-in)
  • Essential window rules for common applications
  • Comprehensive comments explaining each setting

Optimized for users with multiple monitors

Perfect for:

  • Dual-monitor setups
  • Triple-monitor setups
  • Ultrawide + standard monitor combinations

Key features:

  • Per-monitor spatial settings
  • Monitor-specific window placement
  • Workspace organization across monitors
  • Keybindings for moving windows between monitors

Optimized for gaming with XReal glasses

Perfect for:

  • Gamers using XReal glasses
  • Streaming and content creation
  • Immersive spatial experiences

Key features:

  • High-sensitivity spatial tracking for responsiveness
  • Performance optimizations for gaming
  • Gaming-specific window rules (Steam, Discord, OBS)
  • Competitive vs casual gaming presets

Optimized for productivity and efficient workflow

Perfect for:

  • Developers and programmers
  • Writers and researchers
  • Designers and creators
  • Knowledge workers

Key features:

  • Workspace organization by task type
  • Application-specific window rules
  • Productivity-focused keybindings
  • Time-based workflow examples

Optimized for users with accessibility needs

Perfect for:

  • Users with visual impairments
  • Users with motor impairments
  • Users with cognitive considerations
  • Anyone who prefers accessibility features

Key features:

  • Larger window sizes and text
  • High contrast mode
  • Sticky keys and keyboard navigation
  • Reduced motion options
  • Audio feedback support

How to Use These Examples

Quick Start

  1. Choose an example that matches your use case

  2. Copy it to your FloatWM config directory:

    mkdir -p ~/.config/floatwm
    cp docs/examples/<example-file>.toml ~/.config/floatwm/floatwm.toml
  3. Customize it for your needs:

    nano ~/.config/floatwm/floatwm.toml
  4. Restart FloatWM or reload config:

    killall -HUP floatwm

Finding the Right Example

Your Situation Recommended Example
New to FloatWM basic-setup.example.toml
2+ monitors multi-monitor.example.toml
Gaming with XReal glasses spatial-gaming.example.toml
Development/work productivity-workflow.example.toml
Need accessibility features accessibility.example.toml

Combining Examples

You can mix and match settings from different examples:

  1. Start with the example that best matches your primary use case
  2. Copy specific sections from other examples as needed
  3. Test your configuration gradually
  4. Refer to the detailed comments in each file for guidance

Configuration Structure

All FloatWM configuration files follow this structure:

# Focus behavior
focus_behavior = "sloppy"

# Spatial settings (for XReal glasses)
[spatial_settings]
enabled = false
sensitivity = 1.0
max_range = 200
smoothing = 0.5

# Keybindings
[keybindings]
spawn_terminal = ["Super+Return"]
close_window = ["Super+Shift+q"]

# Window rules
[[window_rules]]
class = "Firefox"
float = true
size = [1920, 1080]

# Scratchpad configuration
[scratchpad]
slot_count = 10
default_width = 800
default_height = 600

Customization Tips

1. Start Simple

Begin with basic-setup.example.toml and gradually add features as you learn.

2. Find Your Window Classes

Use xprop to find window classes for rules:

xprop | grep WM_CLASS

3. Test Keybindings

Make sure keybindings don't conflict with your applications.

4. Validate Your Config

Check for syntax errors:

floatwmctl --validate-config

5. Backup Your Config

Before making major changes:

cp ~/.config/floatwm/floatwm.toml ~/.config/floatwm/floatwm.toml.backup

Common Customizations

Change Terminal Emulator

[keybindings]
spawn_terminal = ["Super+Return"]

Then in your terminal emulator settings, set FloatWM as the window manager.

Add Custom Keybindings

[[spawn_commands]]
name = "browser"
command = "firefox"
terminal = false
keybindings = ["Super+b"]

Organize Workspaces

[[window_rules]]
class = "Firefox"
workspace = 1

[[window_rules]]
class = "code"
workspace = 2

Adjust Spatial Settings

[spatial_settings]
enabled = true
sensitivity = 1.5  # Increase for more movement
smoothing = 0.4    # Decrease for faster response

Troubleshooting

Configuration Not Loading

  1. Verify file location: ~/.config/floatwm/floatwm.toml
  2. Check syntax: floatwmctl --validate-config
  3. Check logs: FLOATWM_LOG_LEVEL=debug floatwm

Keybindings Not Working

  1. Check for conflicts with other applications
  2. Verify keybinding format: "Modifier+Key"
  3. Use xev to check if keys are being detected

Windows Not Appearing

  1. Check window rules don't place windows off-screen
  2. Try: floatwmctl reset-positions
  3. Check workspace assignments

Spatial Mode Issues

  1. Verify XReal glasses are connected: floatwmctl status
  2. Recalibrate: floatwmctl calibrate
  3. Check spatial settings are enabled

Learning Resources

Contributing Examples

Have a configuration that works well for a specific use case? We'd love to add it!

  1. Copy an existing example as a template
  2. Customize it for your use case
  3. Add detailed comments explaining each setting
  4. Submit a pull request with:
    • The example configuration file
    • A brief description of the use case
    • Any special requirements or dependencies

Getting Help

License

These examples are part of FloatWM and are licensed under the same terms (MIT OR Apache-2.0).


Last Updated: 2025-01-13

FloatWM Version: 0.1.0