Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Treeniks/chameleos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chameleos

License CI Release

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.

Install

The chameleos packages will install both chameleos and chamel.

AUR (Arch Linux)

chameleos chameleos-bin chameleos-git

E.g. using your favorite AUR helper:

paru -S chameleos

Cargo

Crates.io

cargo install --locked chameleos

Build From Source

git clone https://github.com/Treeniks/chameleos
cd chameleos
cargo build --locked --release

Usage

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

Stroke Color and Width

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.

Eraser

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.

Logging

We use env_logger for logging. Chameleos specific logging targets are:

  • chameleos::general
  • chameleos::socket
  • chameleos::wayland
  • chameleos::render

Why "Chameleos"?

Chameleos

wook at his cute widdle tongue (≧◡≦)

About

Screen annotation tool for niri and Hyprland

Resources

License

Stars

Watchers

Forks