- C 100%
- xtk_entry.c from xtk: the right-click menu of a text field closed as soon as it opened. The menu's own keyboard grab sends the field a FocusOut, and the field hid its menu on it. - xtk_richtext.c from xtk: in a code block a click, a drag, Up and Down measured the line in the body font while it is drawn in the monospace one, so the caret and the selection landed on other characters than the ones under the pointer. A drag whose button release went elsewhere now ends when the button is up. - The version is 1.11. |
||
|---|---|---|
| icons | ||
| screenshots | ||
| src | ||
| test | ||
| LICENSE | ||
| logo.png | ||
| Makefile | ||
| README.md | ||
| skein.c | ||
| skein.desktop | ||
| skein_model.c | ||
| skein_model.h | ||
Skein
A graph-first knowledge workspace: arbitrary typed objects connected by arbitrary typed relationships, described by rich-text documents whose spans can carry semantic meaning. The graph is an editing surface, not just a visualization.
Skein compiles to a single self-contained binary: the SQLite-backed
model layer (skein_model.c/.h) and the application itself
(skein.c) build alongside a vendored copy of the X11 widget toolkit
(xtk_*.c/.h) in src/ — no GTK/Qt, just Xlib, Xrender, Xft, and
SQLite.
The wiki is the user manual: every panel, menu, dialog, setting and key, how to build and install Skein, and how it keeps a note's pictures away from your files.
What Skein is
Skein is for building and browsing a structured, cross-linked body of notes — recipes, a fiction project's characters/locations/scenes, a personal wiki, research notes, anything organized as "a bunch of related things with their own write-ups." It sits somewhere between a Markdown notebook and a lightweight graph database, with the emphasis on the graph being something you actually work in, not a report generated after the fact.
A project is a single file (a .yarn — an ordinary SQLite database
under the hood) containing:
- Object Types — the categories you define for your project (e.g. "Recipes", "Characters", "Bread"). Each type can define its own set of custom fields, and carries its own icon — picked from a searchable library of built-in icons (Edit → Change Icon..., or the right-click context menu) — shown throughout the Project Tree and Inspector; individual objects can override their type's icon the same way. Settings → General switches every toolbar/menu/tree icon between the outline and filled variants of that same icon set.
- Objects — the individual items inside a type (a recipe, a character). Objects can nest under other objects (a scene under a chapter, an ingredient sub-note under a recipe), so the Project Tree reads as a real outline, not just a flat list.
- Documents — every object has its own rich-text document (edited as Markdown under the hood, with a WYSIWYG-style rich text view) for the actual write-up: notes, description, prep steps, whatever the object needs.
- Properties & Table Fields — per-type custom fields (Text, Textarea for several lines, Image, Dropdown) defined once via "Manage Fields" and then editable per-object in the Inspector, plus Table fields (e.g. an ingredients list: amount + name per row) for structured, repeatable data a plain property can't hold. Every object also has a one-line Notes field and a Color.
- Relationships — typed, directional links between any two objects,
added in the Inspector's Relationships tab. A type can carry an
inverse name, typed after " / " (e.g. "Uses Ingredient / Used In
Recipe"): the recipe lists "Uses Ingredient: Flour", the flour "Used
In Recipe: Bread". They are independent of whatever
[links](like-this)you write inline in a document's own Markdown. Both kinds of connection — explicit relationships and in-document links — show up as edges in the Graph. - The Graph — a node-link view. A project of 400 objects or fewer is shown whole; a larger one shows the current selection's own neighborhood (the whole project at once stops being legible past a few hundred objects): the selected object sits centered, with everything connected to it packed onto rings around it, so the shape reads as "this, and what touches it" rather than a tangle; there, selecting a category shows that category's objects around it. Drag nodes to rearrange them by hand; Edit → Sort Graph Nodes, or selecting something new in the tree, arranges the graph again around the selection (so positions you dragged last until the next selection). It stays in sync as you edit relationships and links elsewhere in the app.
- Images decoded in a jail — a note, a folder of Markdown notes or a project can come from anyone, and so can the images it names. Skein never decodes them itself: each image (in a document, in the Relationships view, or an image field's thumbnail) is decoded by xtk's worker, a separate process that the Linux kernel locks in (Landlock and seccomp) so that it can read no file at all, write nothing and reach no network: Skein reads the image and hands it the bytes. What comes back is checked before it is drawn. Without the kernel support (before Linux 5.13, or a processor other than x86-64 or ARM64) images are not shown.
- File dialogs that remember — favorites, hidden files, columns
and sort are kept in
~/.config/skein/file_dialog.txt. - The Project Tree — the primary way to navigate: Types at the top level, Objects (and their own child Objects) underneath, with either manual drag-to-reorder or alphabetical sort. A Find flyout (Ctrl+F, the right-click menu, or the small "Find" tab that otherwise rests peeking out along the panel's own bottom edge) filters the tree down to matching names as you type.
The Document, Project Tree, Inspector (Properties/Relationships tabs for whatever's selected), and Graph are all independent dockable panels — drag any of them out to float as their own window, or redock them, CLion-style: beside or under another panel, or along the bottom, under all three columns or (dropped in a bottom corner) under two, the third then running the full height. The layout, including which panel is above or beside which, comes back exactly as it was left.
Settings (organized into General/Interface/Editor/Files/Templates/
Backup & Recovery/Keyboard Shortcuts tabs, with an Apply button so
changes — including a theme switch — take effect without closing the
dialog) covers the app's own color theme (14 built-in presets, each a
real, hand-editable file under ~/.config/skein/themes/, picked from a
combo box that remembers your choice across launches), the Document
panel's own light/dark/follow-theme mode, autosave, fonts, the backups
each Save keeps (and restoring one), and every keyboard shortcut in the
app, rebindable per action.
Widget toolkit
The xtk_* widgets under src/ are a general-purpose X11 UI toolkit,
not Skein-specific: buttons, checkboxes, radio buttons, spin buttons,
combo boxes, text entries (text/int/float/hex), labels, menus and menu
bars, popup menus, toolbars (a general-purpose icon toolbar, used both
as Skein's own application-level toolbar and, separately, as the
rich-text editor's own formatting toolbar), notebooks, status bars,
tooltips, a progress bar, scrollbars, text views, a rich-text/Markdown
editor with LaTeX math rendering, a data grid, file dialogs, color
swatches, a full color picker with an HSV scheme wheel, SVG and
vector-graphics rendering, a searchable icon grid/picker, grid-based
layout management, clipboard handling, real double-buffered drawing
(Xdbe), input-method (IME) composition support, keyboard focus-ring
coordination, a color-space conversion library (RGB/HSV/HSL/Lab and
more), a tree view, a node-link graph view, and — for Skein's own
dockable tool-window shell — split panes, tool windows, and a dock
frame.
Every widget's config section self-registers with a central registry
(xtk_config_registry) rather than being hardcoded by name — a widget
not linked into a given binary simply never registers, and skein's own
Makefile only compiles the widgets it actually calls (the 54 files in
src/; the rest of the toolkit isn't part of Skein's own UI, so it's
absent from src/ here).
Widget styling and geometry are driven by an INI-style config system
(xtk_config) and theme files. Skein reads its theme file when it
starts and again when a theme is applied in Settings; an edit to the
file shows the next time either happens.
Dependencies
Build-time (via pkg-config):
sqlite3 x11 xrender xft fontconfig freetype2 xcursor
plus libXext and libXpm at link time.
At runtime, Skein needs an X11 display and window manager (developed and tested against Fluxbox, but nothing Skein does is Fluxbox-specific — any ICCCM/EWMH-compliant WM should work) and at least one usable Xft/fontconfig font available on the system.
Building
make # produces ./skein
make clean
Builds clean with -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Werror.
Running
./skein [project-file]
With no argument, Skein reopens whichever project (or set of Markdown folders) was open last, if that option is enabled and the file still exists; otherwise it starts on a new, empty "Untitled" project that lives only in memory until you save it. Saving it (File → Save, or Save in the question asked on quitting) asks where to put it, as Save As does — there's nothing to set up before first launch. A project that cannot be opened is said so in the window, and Skein starts on an empty one instead.
Per-user settings (the window's position and size, last project,
keyboard shortcuts, theme, fonts, etc.) are stored at
~/.config/skein/settings.conf, created automatically on first run.
The panel layout (which panel is docked where, or floating) is kept in
each project, so every project comes back as you left it.
Project files (.yarn)
A .yarn file is a plain SQLite database — nothing proprietary, and
readable/inspectable with any standard sqlite3 tool if you're ever
curious what's actually in there.
While a project is open, you may see two extra files show up next to
it: name.yarn-wal and name.yarn-shm. These are normal
SQLite write-ahead-log files, not something Skein invented — new edits
get appended there first, and are periodically folded ("checkpointed")
back into the real name.yarn file. They:
- are dynamically created the moment a project is opened and normally cleaned up again on a clean close,
- have no meaning on their own without the matching
.yarnfile next to them, - and get regenerated fresh every time regardless — never back them
up or version-control them, only the
.yarnfile itself.
Skein checkpoints (folds the WAL back into the main file, so its own bytes are fully current) at these points automatically — you don't need to think about this during normal use:
- File → Save / Save As
- opening a different project, or entering/leaving markdown-folder mode
- autosave, each time it actually saves (if enabled in Settings)
- quitting the app
The one case worth knowing about: if you ever need to copy, back
up, or commit a .yarn file to version control while Skein still has
it open, do a File → Save immediately before doing so. Copying just
the .yarn file on its own while its -wal/-shm siblings still
exist can leave out whatever hasn't been checkpointed yet — the save
guarantees everything's actually in the one file you're copying.
License
Artistic License 2.0 — see LICENSE.
Screenshots
Each of the 14 built-in app color themes, Project Tree/Document/Graph
docked as usual (see the Interface tab in Settings — ~/.config/skein/ themes/ for the underlying files):
Every dockable panel undocked at once, each floating as its own independent window (Light theme):














