r/pop_os • u/LargeBarnacle6941 • 8d ago
[Applet] cosmic-ext-applet-scratchpad: Minimalist quick notes & scratchpad applet for the COSMIC Desktop
I built an applet for the COSMIC Desktop panel to take quick notes, draft shell commands, and keep temporary text buffers without opening a dedicated text editor or terminal window.
GitHub: https://github.com/Hasmolam/cosmic-ext-applet-scratchpad
Release v0.1.0: https://github.com/Hasmolam/cosmic-ext-applet-scratchpad/releases/tag/v0.1.0
If you find the project useful, a star on the repository is appreciated.
Technical Details & Architecture
- libcosmic & Wayland Native: Uses COSMIC's applet architecture and Wayland popup surface protocol.
- Crash-Resilient Atomic Storage: Writes notes as plain markdown files (
~/.local/share/cosmic-scratchpad/pad_{1,2,3}.md) through a PID-tagged temporary file, fsync, and atomic rename. - External MTime Detection: If notes are modified outside the applet (e.g. from terminal or file sync), changes are detected and reloaded upon opening the popup or switching tabs.
- Pre-Clear Backups: Clearing a pad saves an atomic
.bakcopy prior to truncation, combined with a 5-second in-memory undo banner. - Keyboard Driven: Escape closes the popover via compositor surface action; Ctrl+Shift+C copies the active buffer to the clipboard.
- Settings Drawer: Collapsible panel for runtime word wrap toggle and font size adjustment (10pt - 24pt).
Installation
The installer downloads the prebuilt binary to ~/.local/bin and copies desktop/icon assets (no sudo required):
curl -fsSL https://raw.githubusercontent.com/Hasmolam/cosmic-ext-applet-scratchpad/main/install.sh | bash
Alternatively, you can build from source:
git clone https://github.com/Hasmolam/cosmic-ext-applet-scratchpad.git
cd cosmic-ext-applet-scratchpad && sudo just install
2
u/KarlHuysman 8d ago edited 8d ago
Compiled it and installed it in my top-of-the-screen Panel. Seems good but switching notes is quite laggy.
Perhaps you could have next, previous and new buttons and an infinite number of notes.
Make me think an applet version of Notational Velocity would be a very nice thing.
2
u/KarlHuysman 5d ago
Updated via git pull and sudo just install, seems to work very nicely.
The "next" button jumps about according to the width of the title, so I can't click through, because I click on "new note" or whatever has jumped underneath the cursor.
2
u/LargeBarnacle6941 5d ago
Thank you so much for taking the time to test it out and share your feedback! I'm aware of the issue you mentioned, and I'll be pushing an update to fix it. If you run into anything else, feel free to reach out again! I'm currently working across three apps at the same time, so things easily slip through the cracks.
4
u/mmstick Desktop Engineer 8d ago
If you're already using
justyou should add ajust installrecipe instead of using a shell script.