Skip to content
ShenepoyPublic

About

Lamha (لمحة) — freeze the screen and mark what matters

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Lamha

Lamha - لمحة

Freeze the screen. Mark what matters.
A fast screenshot, then Lamha’s own overlay for select and markup.
Go · GTK4 · Wayland · XDG ScreenCast · PipeWire.

release repo go gtk wayland license

Screenshots · What you get · Install · Develop · Architecture · العربية

The name Lamha comes from Arabic لمحة (lamḥa): a glance / a glimpse — catch the screen in one look.


Screenshots

Home — recent captures and preview

Annotate — tools, colors, and stroke

Capture overlay toolbar — tools, colors, and stroke

Home · Annotate · Overlay toolbar

Dark theme

Home — dark

Annotate — dark

Home · Annotate


What you get

Silent grab Captures the display through GNOME Shell, KWin, Spectacle, or the screenshot portal.
Select Area and full screen use Lamha’s overlay; Window takes a silent Wayland monitor shot, then follows the cursor in Lamha’s overlay.
Markup Pen, arrow, box, ellipse, highlight, blur, numbered steps, text, magic erase, area erase.
Move & restyle Drag marks, restyle them, undo / redo, duplicate, delete.
Lens A circular magnifier under the pointer. Scroll changes size; Settings sets zoom (2×–10×).
Stay in back Close the window to hide it. Capture from the tray, system shortcuts, or lamha --capture=.
History Local captures, preview, copy, reopen Annotate, optional copy-on-save.
Locales English and Arabic (RTL).

Capture modes

Mode Behaviour
Area Freeze, then drag a region and mark it up.
Window Point at a window, click it, then mark up the cropped frame. A Wayland screenshot permission is requested only when needed.
Screen Freeze the whole display and mark it up.

A delay (1–10 seconds) can wait for menus and hover states. Window capture hides Lamha, takes a silent Wayland screenshot, and performs the cursor-based window selection itself. If the desktop does not expose window geometry through AT-SPI, drag the window bounds as a fallback.

Images copied from the annotation overlay are published as a typed image/png Wayland selection before the overlay closes. This keeps GNOME clipboard-history tools from recording PNG bytes as text. Any malformed entries already in a clipboard history must be removed manually.

Captures are saved to ~/Pictures/Screenshots (or Screenshots inside your XDG Pictures folder). Change the save location and choose PNG (lossless, default), JPEG XL (lossless), JPEG, or AVIF (smaller, lossy files) in Settings → Capture. Existing captures keep their format when annotated. JPEG XL and AVIF codecs are included in the binary; no extra tools are required. Previews and annotation support all four formats, and JPEG XL/AVIF clipboard copies use PNG for compatibility.

Fonts and languages

Lamha includes regular and bold Noto Sans, Noto Sans Arabic, and Noto Sans Mono fonts in both the standalone binary and AppImage. It uses private, process-local font families so the interface and annotations do not depend on the host's preferred font or installed Noto version. Desktop text size and scaling are preserved; system fonts remain available as fallback for other scripts.

The AppImage includes a relocatable Fontconfig configuration and repairs stale font paths inherited from another installation. Fonts are cached under $XDG_CACHE_HOME/lamha/fonts, with a temporary-directory fallback when the cache is unavailable. Cached files are checked against the embedded data before use. The fonts use the SIL Open Font License.

Crash reports

Lamha keeps a small local log and crash report under $XDG_STATE_HOME/lamha (usually ~/.local/state/lamha). If the app exits unexpectedly, the next launch shows the report with a read-only path field, copy/open actions, and a pre-filled GitHub issue link. The Arabic layout keeps this action group on the right. Nothing is uploaded automatically; review the report and remove private details before submitting it.


Install

GitHub Releases

Tagged builds publish a Linux binary and an AppImage:

  • Latest release
  • lamha-YY.0M.MICRO-linux-x86_64 — standalone binary (needs GTK 4.22+ / GLib 2.86+ on the host)
  • Lamha-YY.0M.MICRO-x86_64.AppImage — bundled GTK 4; needs glibc 2.35+ (Ubuntu 22.04, Fedora 36, Debian 12, and later)

Mark the AppImage executable, then run it. AppImageUpdate can follow https://github.com/Zyzto/Lamha/releases/latest. Versions are calendar versions like Janan: YY.0M.MICRO (the first August 2026 release was 26.08.0). The tag is v followed by the value in VERSION.

Official AppImages include wl-copy for text clipboard operations started from global shortcuts. Image captures use GTK's typed Wayland provider so clipboard history preserves them as image/png; source installs should still install the wl-clipboard package for background text copies.

From source

Install bin/lamha on PATH, then:

File Destination
data/io.github.lamha.Lamha.desktop ~/.local/share/applications/
data/icons/hicolor/scalable/apps/io.github.lamha.Lamha.svg ~/.local/share/icons/hicolor/scalable/apps/

On GNOME, bind keys in Settings → Keyboard, or open Shortcuts in Lamha. Plasma: System Settings → Shortcuts.

AppImage

Needs Go, GTK4 and PipeWire development files, pkg-config, and curl:

make appimage

The script pulls linuxdeploy and writes a bundle under dist/. GTK4 bundling is most reliable on a regular FHS distro (Fedora, Ubuntu). On NixOS, build the AppImage from a container or another Linux system if linuxdeploy cannot collect host libraries.


Develop

Requirements: Go 1.26.10 or newer · GTK4 · PipeWire (libpipewire-0.3) · pkg-config

On NixOS (or with Nix installed):

nix develop
make run

Otherwise install your distribution’s GTK4 development package, pkg-config, and Go, then:

go run ./cmd/lamha

Capture without opening the window first (forwarded to a running instance):

lamha --capture=area
lamha --capture=window
lamha --capture=screen

The standalone portal/PipeWire example writes the selected frame to window_capture.png (or a path supplied as its first argument):

It uses the portal's strict WINDOW-only (types=2) picker, which is useful when a compositor-native selection dialog is preferred over Lamha's cursor overlay.

go run ./cmd/window-capture
make test
make build
make fmt
lamha --version

Cut a release by bumping VERSION (or bash scripts/ci/next_version.sh), committing, then:

git tag "v$(tr -d '[:space:]' < VERSION)"
git push origin master --follow-tags

Actions tests, builds the binary and AppImage, and attaches them to the GitHub Release.


Architecture (short)

  • UI — GTK4 (gotk4), overlay + editor, Arabic via internal/i18n
  • Grab — GNOME Shell D-Bus → gnome-screenshot → KWin → Spectacle → silent portal
  • Window selection — silent Wayland screenshot → AT-SPI window geometry → cursor hit-test → cropped frame (drag fallback when metadata is unavailable)
  • Markup — internal/annotate document (undo, hit-test, raster cache)
  • Tray — StatusNotifierItem + DBusMenu
  • Prefs / keys — ~/.config/lamha/
Tray / CLI / desktop actions
        ↓
Silent grab (GNOME Shell / KWin / Spectacle)
        ↓
Lamha overlay (select + markup)
        ↓
preview / clipboard / local history

Window capture instead follows:

Tray / CLI / desktop actions
        ↓
Silent Wayland screenshot (portal fallback)
        ↓
AT-SPI window geometry
        ↓
Lamha overlay (cursor window hit-test + markup)

This is a solid capture foundation, not a claim to ShareX’s full set. Useful next steps are upload destinations and history search.


License

AGPL-3.0 — use, study, modify and redistribute freely; if you run a modified version as a network service, its users are entitled to your source.

The name Lamha, the Arabic wordmark لمحة, and the logo are not covered by that licence. Fork the code, but please ship a fork under a different name and icon.


Made by shenepoy · GitHub

About

Lamha (لمحة) — freeze the screen and mark what matters

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages