Wayland screen annotation tool, tested for niri and Hyprland.
demo-chameleos.mp4
Originally bodged together with eframe for a lecture, this repository holds a complete low-level rewrite, utilizing wayland's layer shell protocol with wayland-client directly, path tessellation with lyon and GPU rendering with wgpu.
The chameleos packages will install both chameleos and chamel.
E.g. using your favorite AUR helper:
paru -S chameleoscargo install --locked chameleosgit clone https://github.com/Treeniks/chameleos
cd chameleos
cargo build --locked --releasechamel is a helper utility used to send commands to chameleos while it is running. chameleos itself has no keyboard input functionality, all keybinds (for example to toggle input) must be handled from the compositor and chamel.
To start chameleos:
chameleos &This will create a layer shell overlay over your entire current screen in which you can draw. There is currently no way to switch display after start. To toggle input, run chamel toggle, after which you can draw with the left mouse button or with a pen on a graphic tablet.
Example keybind configuration in niri:
F1 { spawn "chamel" "toggle"; }
F2 { spawn "chamel" "undo"; }
F3 { spawn "chamel" "clear"; }
F4 { spawn "chamel" "exit"; }To see a list of commands, run chamel help.
The stroke width can be set
- on startup with
chameleos --stroke-width 16(default is 8) - on the fly with
chamel stroke-width 16
The stroke color can be set
- on startup with
chameleos --stroke-color "#00BFFF"(default is#FF0000) - on the fly with
chamel stroke-color "#00BFFF"
The color can be given in whatever formats the csscolorparser crate supports. The color can also include opacity, so you could make a highlighter pen. Multiple pens aren't explicitly supported, but the same can be achieved with respective stroke-color and stroke-width keybinds.
The only eraser type currently supported is a stroke eraser. It is mapped to the right mouse button as well as pen button 1 for graphic tablets (Linux Artist Mode in OpenTabletDriver). Remapping this is currently not supported. To improve performance, chameleos may sometimes split lines into multiple segments if they get too long, in which case only one of these segments will get erased instead of the entire line.
We use env_logger for logging. Chameleos specific logging targets are:
chameleos::generalchameleos::socketchameleos::waylandchameleos::render
wook at his cute widdle tongue (≧◡≦)