grassleaff/Xoverdraw
1
0
Fork
You've already forked Xoverdraw
0
Draw on screen with Xoverdraw, a SDL2 lightweight X11 screen annotation overlay written in C. It runs as a borderless, always-on-top, transparent window that lets you draw directly over whatever is on your screen.
  • C 97.8%
  • Makefile 2.2%
2026年05月22日 09:21:28 -03:00
assets Updating README.md with logo and some other changes 2026年04月30日 10:58:36 -03:00
src ADD: Implementing shape mode ("F" bind key) 2026年05月22日 09:21:28 -03:00
.gitignore FIX: Fix binary name + Installing assets/ system-wide on /usr/share/Xoverdraw/ to fix eraser circle cursor 2026年04月30日 16:10:14 -03:00
LICENSE Initial commit 2026年04月30日 15:19:00 +02:00
Makefile FIX: Fix binary name + Installing assets/ system-wide on /usr/share/Xoverdraw/ to fix eraser circle cursor 2026年04月30日 16:10:14 -03:00
README.md ADD: Implementing shape mode ("F" bind key) 2026年05月22日 09:21:28 -03:00

accessibility text

A SDL2 lightweight X11 screen annotation overlay written in C. It runs as a borderless, always-on-top, transparent window that lets you draw directly over whatever is on your screen.

Dependencies

On Debian/Ubuntu:

sudo apt install build-essential pkg-config libsdl2-dev libsdl2-image-dev \
 libx11-dev libxrender-dev

Build & Run

make
./Xoverdraw

Controls

Input Action
Left mouse button Draw with brush
Right mouse button Erase while held
F Toggle shape mode
Tab Cycle shape: rectangle, ellipse, line, arrow
Shift + Tab Cycle shape backwards
15 Select color from palette
[ / ] or scroll wheel Decrease / increase held tool size
Shift + size adjustment Fine-tune size in increments of 1
Z Undo last stroke or shape
C Clear canvas
O Toggle window opacity
Esc or Q Quit

Configuration

All user-tweakable options live in src/include/config.h. After editing, rebuild with:

make clean && make

The following settings are available:

Constant Description
XOVERDRAW_INITIAL_BRUSH_SIZE Starting brush radius (default: 5)
XOVERDRAW_INITIAL_ERASER_SIZE Starting eraser radius (default: 50)
XOVERDRAW_MIN_TOOL_SIZE / MAX Allowed size range (default: 2120)
XOVERDRAW_TOOL_SIZE_STEP Size increment per keypress/scroll (default: 2)
XOVERDRAW_DEFAULT_BRUSH_COLOR_INDEX Index into the palette for the initial color
XOVERDRAW_PALETTE Five RGBA colors: red, green, blue, yellow, white
XOVERDRAW_WINDOW_OPACITY Normal window opacity (default: 1.0)
XOVERDRAW_DIMMED_WINDOW_OPACITY Dimmed opacity toggled with O (default: 0.42)
XOVERDRAW_CURSOR_* Brush cursor appearance (color, shadow, crosshair geometry)
XOVERDRAW_SHAPE_CURSOR_* Shape cursor dimensions
XOVERDRAW_ERASER_CURSOR_* Eraser cursor appearance (color, shadow, thickness, smoothing)
XOVERDRAW_ERASER_CURSOR_IMAGE Path to the PNG used as the eraser cursor overlay

X11 Transparency

Real window transparency on X11 requires two things:

  • A 32-bit ARGB visual, which Xoverdraw selects automatically via SDL_HINT_VIDEO_X11_WINDOW_VISUALID.
  • An active compositor such as picom, mutter, kwin, or the XFCE compositor.

Without a compositor, ARGB windows typically render as solid black. Xoverdraw prints a warning to stderr when it detects this situation.

License

MIT License — Copyright (c) 2026 grassleaff.