Skip to content
k4ditanoPublic

About

A file manager for pleamar-wm that finds your files by what is in them: photos, PDFs, recordings, videos and code, on EmbeddingGemma 2, all local

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

Sonda

Badge License Badge Language Badge Commit Badge Issues Badge Discord Badge X Badge Ko-fi


Sonda is a file manager for pleamar-wm, and for any other Wayland compositor, whose search knows what your files hold: a photo by what it shows, a PDF at the page that says it, a recording at the minute, a video at the moment, code at the line. Describe it in your own words, in any language, and it digs it up. Everything runs on your computer.




Install

What it reads

Keys

pleamar-wm

pleamar

Discord



What's new

  • 0.2.2 · «Open» and «Save» work again: since 0.2.1 the dialog closed as soon as it opened, without a word (its copy of the window's files read the fonts as text). And a Sonda the portal woke before the desktop said where its display is no longer keeps a world without one: its windows find the display.

  • 0.2.1 · Lighter on the graphics card: reading code and text opens only the words model (about 300 MB of the card instead of 1.25 GB); the picture and sound encoders open when one comes and close a minute after. With the card full it reads on the processor instead of failing.

  • Search by meaning can be turned off (Settings, sonda semantic off): then no model is ever opened, and a search finds words and names.

  • A terminal here is Bitácora when it is installed, and «Play here» says «Play» where the window cannot hold the player (plain pleamar, without pleamar-wm): the video opens in your player.

  • A new window: in the look of the desktop it is on, and following it. Under Calima it takes the Taller's accent, surface, ink and corners, and changes when you change them. Its letters are Newsreader, Manrope and JetBrains Mono (in the binary, SIL OFL), and its icons are grains: what a file is, how big it is, how full a disk is, how far a copy has gone.

  • Tabs: Ctrl+T, Ctrl+W, Ctrl+PageUp/PageDown; a folder in a new tab from its menu. Each tab keeps its folder, its history, its search and its view.

  • Three views: tiles; a list with its columns (name, modified, size in grains, kind) and its groups by day or by kind; and columns going down the tree, as in Finder.

  • Looking for a name: writing on a folder looks for a name there and in what is inside (words in any order, accents and case not counting, or *.pdf), and says in which subfolder each one is. Tab turns it into the search by what files hold.

  • An island for what is chosen (how many, what they take, copy, cut, compress, trash), an islet for each long job, and a dune of grains for an empty folder. Another folder starts at its top, and one you go back to opens where you were.

  • A location bar: Ctrl+L, or a press beside the crumbs, turns them into the whole path, to write another one. ~ is your home, a relative path goes from the folder shown, Tab finishes a folder's name, and a file's path opens its folder with that file chosen. It works in the Open/Save dialog too.

  • The reader waits for your videos: while a browser or a video player is playing, it stops and lets go of the graphics card, so the video never stutters for it.

  • Light on the graphics card: reading code and text opens the words alone (about 300 MB); the picture and sound encoders (about 1 GB in all) open only when a picture, a sound or a video comes, and go a minute after the last one. Nothing stays on the card once there is nothing to read. With the card full, the model runs on the processor instead of not at all.

  • Search by meaning, or not: Settings › Search by meaning, or sonda semantic off, and no model is ever opened: a search finds the words themselves and names. Turned on again, what was read meanwhile is read again for its meaning.

  • Narrow windows: under 760 px the sidebar keeps only its icons, and the toolbar, the filters and the dialogs give up what does not fit.

Every change, in the commits.

It is built on Google DeepMind's EmbeddingGemma 2, the multimodal embedding model released in October 2026, running on llama.cpp (on the graphics card with Vulkan), and its window is a pleamar scene. The way it reads files and ranks what it finds follows DigUp (MIT), which brought this model to macOS, Windows and Linux first.

Features

  • A file manager: your places and your drives (a stick mounts when you press it and has an eject button), the folders as a grid of real thumbnails (photos, the first page of a PDF, a frame of a video) or as a list; back, forward, up, crumbs and a location bar to write a path in; copy, cut, paste, rename, new folder, the trash and restoring from it; files dragged out to any program, and dropped in from any program (onto the folder, a folder in it, a place, a crumb or a drive).
    • Big copies say how far they are and can be stopped halfway (nothing half-copied is left). On btrfs or xfs a copy is a reflink: instant.
    • A name already taken asks: replace, skip or keep both. What is replaced goes to the trash.
    • Ctrl+Z undoes the last copy, move, rename, new folder, trip to the trash, packing or unpacking.
    • Open with… any program, once or always for that kind of file.
    • Properties: size (a folder's, counted), dates, owner, who may read, write and run it (and changing it), and room left on the disk.
    • Compress to zip (or tar.gz, tar.xz, 7z… by the name you give) and extract here anything bsdtar reads: zip, rar, 7z, tar.*, iso.
    • A terminal in the folder.
  • A search by meaning and by words. Type in the box: «the contract for the flat», «a dog on the beach», «where they talk about sleep». Exact words count too (invoice numbers, names, codes), as written in file names and in the text of documents. Filter by kind (pictures, PDF, documents, sound, video, code) and search everywhere or only in the folder you are in.
  • Found where it is: each result says where —page 5, at 1:23, line 120—, and the look on the right shows that page, that frame, that stretch of text with your words in bold. «Open at page» opens the PDF there; a video or a recording plays right there, inside the look, from the moment found (ffplay inside Sonda's own compositor: pleamar-wm holds windows in windows).
  • Code: start a search with code: and say what the code does («code: retry a failed call with backoff»). Your projects are read as git sees them (what it ignores is left out), never keys or password files.
  • Everything at once: the reader runs in the background (sonda daemon), at the lowest priority, and a new file is searchable seconds after it lands.

Gallery


Sonda finding pictures by what they show

«a girl with cat ears»: pictures found by what they show, whatever their name.



Sonda finding the page of a PDF that answers a question

«how long does the rice cook»: the page of the PDF that says it, with your words in bold.



A folder of pictures in Sonda

A folder, with real thumbnails.



Install

It needs pleamar 0.5.1 or newer (its window is a pleamar scene), ffmpeg, poppler (pdftotext, pdftoppm), gio (the trash), wl-copy, bsdtar (libarchive: packing), udisksctl (drives), and for the graphics card the Vulkan driver and glslc to build.

git clone https://github.com/k4ditano/sonda && cd sonda
sh scripts/build-llama.sh   # llama.cpp at the tag EmbeddingGemma 2 came with, with Vulkan (a while)
sh install.sh               # ~/.local/bin/sonda, its libraries, the models (865 MB), the window

sonda setup downloads the model the first time (ggml-org's 8-bit build: the text part, 310 MB, and the picture and sound encoders, 555 MB). In ~/.config/pleamar/keys.conf:

bind Super+e  launch sonda
bind Super+s  launch sonda --search

and in ~/.config/pleamar/autostart, so the index is always ready:

sonda daemon

On another compositor

Sonda is a window like any other, so it works on any Wayland compositor: Hyprland, niri, Sway, KDE. What changes is who holds its window:

  • With pleamar-wm installed (it does not have to be your session), the window runs inside it, and a video or a recording plays right in the look.
  • With pleamar alone, all the same, except that «Play here» opens your own player.

Start the reader with your compositor (exec-once = sonda daemon on Hyprland) and bind a key to sonda. For the Open/Save dialog, the portal line below goes in your desktop's file (hyprland-portals.conf, niri-portals.conf…), and a window rule there can float the title «Sonda · Elegir».

Sonda looks for pleamar-wm, then pleamar, in your PATH, where sonda setup last found them, and in ~/.local/bin, ~/.cargo/bin and Nix's profiles; SONDA_PLEAMAR=/path/to/pleamar says which one to use.

What it reads

The folders in ~/.config/sonda/config.json (your Desktop, Documents, Downloads, Pictures, Videos and Music at first; your Projects as code). A git worktree inside them (git worktree add) is left out: it is a second copy of a project read already. A submodule is read, being its own code.

pictures PNG, JPEG, WebP, GIF, BMP, TIFF, by what they show (screenshots with more detail)
PDFs page by page: the text of each page, and the page itself when it is a scan or a slide
documents txt, md, html, docx, odt, rtf, in overlapping stretches
sound any length, as overlapping 30-second windows (mp3, wav, flac, ogg, m4a, opus…)
video a frame every few seconds (near-duplicates dropped), and its soundtrack as sound
code stretches of whole lines, titled by their path in their project

It never reads hidden folders, node_modules, build folders, keys, certificates or password files. Inside a code project in your other folders it reads only pictures and media.

The desktop's file manager

sonda setup puts Sonda on the session bus, started when it is asked for:

  • org.freedesktop.FileManager1: a browser's or a chat's «Show in folder» opens Sonda at that folder with the file chosen.

  • org.freedesktop.impl.portal.FileChooser: the «Open» and «Save» dialog of every program that asks xdg-desktop-portal for one. It is Sonda's own window with a bar at the bottom —what will be given, the program's filters, the name to save with—, and its search works there too: «the electricity bill from March», and attach it. This one needs xdg-desktop-portal to know about it, once, as root. install.sh asks for it with sudo when you run it at a terminal; otherwise:

    sudo install -Dm644 data/sonda.portal /usr/share/xdg-desktop-portal/portals/sonda.portal

    and, in ~/.config/xdg-desktop-portal/pleamar-portals.conf (under [preferred]; on another desktop, its own file: hyprland-portals.conf, niri-portals.conf…), org.freedesktop.impl.portal.FileChooser=sonda; then systemctl --user restart xdg-desktop-portal. Chrome and Electron programs use the portal by themselves; Firefox and Zen with widget.use-xdg-desktop-portal.file-picker set to 1; GTK programs with GTK_USE_PORTAL=1. Picking, the window is titled «Sonda · Elegir», so it can float over the program like a file dialog: in pleamar-wm's session.conf, window title="Sonda · Elegir" float (elsewhere, a window rule on that title).

To open folders with it: xdg-mime default sonda.desktop inode/directory.

Keys

Super+E · Super+S Sonda · Sonda with the search ready
typing on a folder looks for a name here and inside · Tab: by what files hold
Ctrl+T · Ctrl+W · Ctrl+PgUp Ctrl+PgDn new tab · close it · the one before, the next
↑ ↓ ← → · Enter move · open (a folder goes in)
Alt+← Alt+→ Alt+↑ · Backspace back, forward, up · back
Ctrl+C Ctrl+X Ctrl+V copy, cut, paste (other programs paste them as files)
F2 · Ctrl+Shift+N · Delete rename · new folder · to the trash
Ctrl+L the location bar: write a path (~ is home, Tab finishes a folder's name)
Ctrl+H · Space · Ctrl+A hidden files · the look on and off · all
Ctrl+Z · Alt+Enter undo · properties
Esc leaves the search, or lets go of what is chosen (picking for a program: cancels)

From the terminal

sonda search a receipt from the supermarket
sonda search code: where the window manager docks a window
sonda status          # how the reading goes
sonda pause · resume  # stop reading for a while
sonda semantic off    # words and names only, no model on the graphics card (on: by meaning again)

How it works

your folders ─► readers: pictures, PDF pages (pdftotext, pdftoppm), documents,
                sound and frames (ffmpeg), stretches of code
             ─► EmbeddingGemma 2 on llama.cpp (Vulkan), through a small C layer
             ─► one SQLite file: a vector (768 halves) for every picture, page,
                stretch, frame and half minute of sound, and a keyword index (FTS5)
your words   ─► the same model's text part ─► every vector scored, put on one
                scale per query, plus the exact words ─► what stands out

The window is ui/sonda.plm (what is drawn and how it moves) and ui/sonda.luau (its logic), which talks to sonda bridge, a JSON line each way. Any agent can use it as a person would: pleamar --say sonda describe.

Special Thanks


DigUp - For bringing EmbeddingGemma 2 to the desktop first, and the way Sonda reads and ranks

EmbeddingGemma 2 - For pictures, sound, video and words in one space

llama.cpp - For running it on any graphics card

pleamar - For everything that is painted

License

Sonda is under the MIT License. EmbeddingGemma 2 is Apache 2.0 (Google DeepMind); llama.cpp is MIT. The reading and ranking follow DigUp's (MIT, Abdur Rahim). Sonda is not affiliated with Google. Gemma is a trademark of Google LLC.

Contributions are welcome, made with AI or without it: see the AI policy.

Made by @k4ditano — follow along on X for what comes next, and come and say hi, ask or show what you made on Discord. If it helps you find your things, you can buy me a coffee on Ko-fi ☕

About

A file manager for pleamar-wm that finds your files by what is in them: photos, PDFs, recordings, videos and code, on EmbeddingGemma 2, all local

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages