notesy::hidden

Any note, file or folder can be hidden from the sidebar's tree, as Explorer and Finder hide things: right-click it and pick Hide from sidebar. Hidden isn't gone: it's still found by search and the quick switcher, linked to and opened. The Notes heading's right-click menu has Hidden items: Show hidden items brings them in sight, faded and marked with a struck-through eye, until Stop showing hidden items (the palette has it too), and each of them is there to show again. Show in sidebar puts one back for good: on its right-click menu, in its hover card, or in Hidden items.

What's hidden is kept in the vault, in .notesy/hidden, a path a line, so it goes where the vault goes and stays out of the notes. Moving or renaming something hidden keeps it hidden; moving it to the Trash takes it off the list.

A plugin's script can hide and show things too, with the ui permission.

rustuse notesy::{events, hidden, log};

pub fn ready() {
    // Attachments out of the way.
    hidden::hide("attachments");
    if hidden::is_hidden("attachments/scan.pdf") {
        log::info("in a hidden folder, so hidden with it");
    }
    events::on("hidden.changed", |e| log::info(`${e.path}: ${e.hidden}`));
}
Function What it does
hidden::hide(path) Hides the note, file or folder at path (in the vault: "Projects/Old"). Fails for a path with nothing at it.
hidden::show(path) Shows it again.
hidden::list() Everything hidden, as paths in the vault.
hidden::is_hidden(path) Whether it's hidden, or in a folder that is.

Hearing hidden.changed (path, and hidden: whether it's hidden now) takes notes.read, as the vault's other events do (notesy::events).

Every page