DeskLeaf provides sticky notes that sit on the desktop layer, below ordinary application windows, with a tray icon for creating and finding notes. It supports Windows, macOS, Linux X11, and Linux Wayland through platform-specific desktop-layer integrations.

Notes are stored locally in SQLite. Optional synchronization uses either a folder or WebDAV target, including Nextcloud, and encrypts note text and colours with XChaCha20-Poly1305. Conflicts are preserved as separate conflict notes rather than merged silently, while window positions remain local to each device.

The project includes unit tests, CMake-based builds, Linux Debian packaging, a macOS application bundle, and a Windows installer configuration. Repository and release metadata are refreshed from Gitea during the static site build when the build environment has access to the repository.

Repository README

DeskLeaf

DeskLeaf

Sticky notes that live on your desktop: above the wallpaper, below every other window, with a tray icon for creating and finding notes. Windows, macOS and Linux, built with C++20 and Qt 6 Widgets.

Build

Requirements: CMake 3.21+, a C++20 compiler, Qt 6.4+ (6.8 LTS recommended) with the Widgets, Sql (SQLite driver), Network and Test modules, libsodium, and qtkeychain for Qt 6.

PlatformInstalling libsodium and qtkeychain
Debian, Ubuntu, Mintsudo apt install libsodium-dev qtkeychain-qt6-dev pkg-config
macOSbrew install libsodium qtkeychain pkg-config
Windowspackaging\windows\build-installer.ps1 builds both, then the app, its tests and the installer

Without qtkeychain the build still works, but sync can only keep its password in a plain file, and only if you agree to that.

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

On Linux, install KDE’s LayerShellQt development package before configuring to get proper desktop-layer notes on Wayland (KDE Plasma, Sway, Hyprland).

macOS release

packaging/macos/build_release.sh makes the release .dmg, for Apple Silicon on macOS 12 and later. It uses the official Qt rather than Homebrew’s, whose libraries only run on the newest macOS. The top of the script explains how to install it.

How notes stay on the desktop layer

All of it lives in src/platform/, one file per OS, behind DesktopLayer.h:

PlatformApproach
WindowsKept directly above Progman in the z-order, re-applied in WM_WINDOWPOSCHANGING and on a timer, so notes stay visible when Win+D raises the desktop
macOSNSWindow level just above desktop icons, joins all Spaces, no Dock icon (LSUIElement)
Linux X11_NET_WM_STATE_BELOW via Qt::WindowStaysOnBottomHint
Linux Waylandwlr-layer-shell bottom layer via LayerShellQt; on GNOME (no layer-shell) the app runs under XWayland instead

Set QT_QPA_PLATFORM yourself to override the automatic XWayland choice.

On GNOME the tray icon needs the AppIndicator extension.

Storage

Notes are kept in SQLite at the platform app-data location (~/.local/share/DarkSingularity/DeskLeaf/, ~/Library/Application Support/DeskLeaf/, %APPDATA%\DarkSingularity\DeskLeaf\).

  • notes: UUIDv7 ids, soft deletes, updated_at and rev per note, and conflict_of on conflict copies
  • changes: append-only log of local content changes, with the device id and a synced flag
  • note_geometry: window placement per device, never synced
  • sync_items: each note’s content hash and remote etag at the last sync
  • sync_state: the install’s one sync target
  • meta: device_id and schema_version

Sync

Set it up from the tray menu with Sync settings…. A target is a folder (local, network, or one kept in sync by another app such as Syncthing) or a WebDAV server, including Nextcloud (https://host/remote.php/dav/files/<user>/). Each install has one target. It syncs on startup, about 10 seconds after an edit, every 5 minutes, and from Sync now.

All the logic is in the app (src/sync/SyncEngine). The target only stores files, so a new provider is one small SyncBackend class:

DeskLeaf/
  info.json              format version, encryption settings, wrapped key
  notes/<uuid>.json      one file per note, including deleted ones
  locks/<type>_<device>.json
  devices/<device>.json  OS, app version, last sync

Conflicts. Changes are found by comparing content hashes, not clocks. If a note changed on two devices, the version on the target wins and this device’s text is kept as a new note with a “Conflict” label. Nothing is merged. A note that was edited here and deleted elsewhere stays deleted, with the edit kept as a conflict copy; a note deleted here and edited elsewhere comes back. New blank notes stay local until they have text. Window positions never sync.

Encryption is on by default. A random key encrypts each note’s text and colour with XChaCha20-Poly1305; that key is stored in info.json, wrapped with a key derived from your password with Argon2id. Other devices need the password once, and then keep the key in the OS keychain. The storage can still see note ids, timestamps, revisions, device ids and deleted flags, but can’t change them unnoticed. A lost password can’t be recovered.

Layout

src/core/      storage (no GUI dependency, unit tested)
src/sync/      sync engine, encryption, folder and WebDAV targets (unit tested)
src/ui/        note windows, tray, note manager, sync settings and scheduling
src/platform/  per-OS desktop-layer code
tests/         Qt Test unit tests
packaging/     platform packaging files (Windows .ico/.rc, macOS .icns, Linux .desktop)
assets/        logo (branding/) and generated app icons (icons/)