| Crates.io | x11-overlay |
| lib.rs | x11-overlay |
| version | 0.1.0 |
| created_at | 2025-09-21 23:13:38.066733+00 |
| updated_at | 2025-09-21 23:13:38.066733+00 |
| description | A library for creating overlay interfaces on X11 systems using Cairo for rendering |
| homepage | https://github.com/cinnes/x11-overlay |
| repository | https://github.com/cinnes/x11-overlay |
| max_upload_size | |
| id | 1849297 |
| size | 369,763 |
A lightweight, transparent overlay system for X11 window managers. Create click-through overlays with custom UI components for status displays, HUDs, and desktop enhancements.
# Clone and build
git clone https://github.com/cinnes/x11-overlay.git
cd x11-overlay
cargo build --release
# Run the overlay
./target/release/x11-overlay
Should work with EWMH-compliant window managers:
src/
├── graphics/ # Rendering system (X11 + Cairo text)
├── ui/ # Component system and composite widgets
├── x11/ # X11 utilities and visual helpers
├── overlay.rs # Core X11 window management
└── main.rs # Application entry point
Create custom overlay elements by implementing the Component trait:
use crate::graphics::{Color, GraphicsContext, Rectangle};
use crate::ui::Component;
use anyhow::Result;
struct StatusBar {
position: Rectangle,
color: Color,
}
impl Component for StatusBar {
fn render(&self, graphics: &mut GraphicsContext) -> Result<()> {
graphics.renderer().fill_rectangle(self.position, self.color.to_renderer_color())
}
fn bounds(&self) -> Rectangle {
self.position
}
fn update(&mut self, _delta_time: f64) -> bool {
false // No animation needed
}
}
The overlay uses standard X11 properties and can be configured through window manager rules:
# i3wm example
for_window [class="x11-overlay"] floating enable, border none
# Install pre-commit hooks
git config core.hooksPath .githooks
# Run quality checks
cargo clippy
cargo fmt
# Note: Test suite is in development
anyhowCurrent State: Early development with text rendering support
Performance: Lightweight design optimized for minimal resource usage
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Licensed under the MIT License. See LICENSE for details.
Built with:
This project follows Google's engineering standards for open source projects.