The service
Opening a note in n0te feels instant because almost nothing happens when you type n0. The work was done earlier, by a service that’s already running.
Two programs
| Program | Job |
|---|---|
n0te (and n0) | The command you type. It doesn’t load GTK, so it starts in under a millisecond. It sends its arguments to the service over a Unix socket and exits when the service answers. |
n0te-app | The GTK app that renders notes and owns the windows. As n0te-app --service, it stays resident with the GPU, fonts and syntax grammars warmed up. |
A GTK app takes 200 ms or more just to start. The service pays that once per session; every open after that costs only the work of rendering the note.
Starting and stopping
- At login, if Start at login is on (
n0te --setupturns it on), Hyprland runsn0te --service, so even the first open is instant. - Otherwise, the first
n0of a session starts the service in the background. That open takes about 350 ms; the next ones about 30. - The service runs in its own session, so closing the terminal you started it from doesn’t stop it.
n0 --quitsaves every open note and stops it. Do that after an update or a rebuild, so the next open runs the new version.
If the service can’t be reached or started, n0 runs n0te-app directly for that open. It’s slower, but it works.
Timings
Measured from spawning n0 to the compositor showing the first frame, on the reference machine (RTX 3070, Hyprland 0.56, 240 Hz), opening a 31 KB note:
| Open | p50 | p95 |
|---|---|---|
| Service running | 28 ms | 29 ms |
| Cold, no service | 203 ms | 207 ms |
The first n0 of a session, which also starts the service, takes about 350 ms. Rendering every note in a 49-note vault takes 29 ms in total.
n0 --bench FILE reports the time to first frame on your machine, and bench/m0.sh in the repository runs the full measurement.
The socket and the log
The socket is n0te.sock in $XDG_RUNTIME_DIR (usually /run/user/1000), readable only by you. The service’s output goes to n0te-service.log next to it: start-up and socket errors, GTK warnings, and a crash’s last words. Problems with a file show in the window’s status line instead.
Without XDG_RUNTIME_DIR, both live in a private n0te-UID folder in /tmp that n0te creates for you, and refuses to use if anyone else owns it or can read it.
Memory
The service holds one GTK process with its windows. Your undo history lives there too, which is why u still works after you close and reopen a note, and why it’s gone after n0 --quit.