notesy::status
Items of the plugin's own in the status bar, set and kept until it
changes or hides them: nothing runs while they just sit there. Takes the
ui permission.
rustuse notesy::{status, Color, Icon, Side};
pub fn ready() {
let left = status::add("left");
left.set("3 left");
let sync = status::add("sync");
sync.set(#{ text: "Synced", icon: Icon::Check, side: Side::Left, color: Color::Success, hint: "Up to date" });
left.remove();
}
| Function | What it does |
|---|---|
status::add(key) |
An item of its own, shown once it's set; returns it. |
item.set(value) |
Shows it, or changes it. value is its text, or an object. An option it doesn't know is refused by name (a status item has no option “txt”), as adds are, rather than passed over. |
item.remove() |
Hides it; set shows it again. |
key names it: lowercase letters, digits, -, _ and ., starting with
a letter.
An item object has text, and any of:
| Field | What it is |
|---|---|
icon |
Its icon, by name. |
hint |
Shown under the pointer; the plugin's name unless set. |
command |
A command run when it's clicked: a command's id(), or notesy's own. |
side |
left, after the note's name, or right (the default), before notesy's own. |
order |
Lower comes first, left to right. |
color |
Its text's color: a theme color's key, or one of the plugin's own. |
icon_color |
Its icon's color, as color takes them (#rrggbb too): the sky's for a forecast, say. The bar's own otherwise. |
card |
A view (notesy::view) shown over it while the pointer's on it, in place of its hint: a card of what it's about (a place's weather, the next hours). Only looked at: nothing in it is heard. |
When the plugin stops, its items go with it.
Every page
- Overview
- plugin.toml: Every field of plugin.toml
- Permissions: What a plugin can ask for, when notesy asks, and what changes it
- Scripts: How a script runs: its lifecycle, events, limits and errors
- Packing and installing: Making, checking, signing, packing and installing
- notesy::log: Lines for its log on the Plugins page
- notesy::events: Hearing what happens, and every event
- notesy::commands: Adding commands, and running notesy's
- notesy::store: Keeping its own data
- notesy::settings: Reading its settings
- notesy::secrets: Keys and tokens, in the system keychain
- notesy::notes: Reading and changing the vault's notes
- notesy::editor: The note in front
- notesy::templates: What templates fill in, and functions of its own for them
- notesy::files: A folder of its own
- notesy::links: Opening pages in the browser, naming links after their pages
- notesy::clipboard: Copying and pasting
- notesy::view: What panels, tabs and sections show
- notesy::sections: Sidebar sections
- notesy::hidden: Hiding notes, files and folders from the tree
- notesy::status: Status bar items
- notesy::tools: Buttons in the formatting bar
- notesy::notices: Notices
- notesy::dialogs: Asking in a dialog, notesy's kinds or its own
- notesy::wizards: Pages one after another, like a setup
- notesy::boards: Boards' cards and arrows, and kinds of card of its own
- notesy::blocks: Drawing its fenced blocks
- notesy::icons: Drawing its own icons
- notesy::net: Requests to the sites it names
- notesy::ipc: Talking to a program on this computer
- notesy::accounts: Signing in to a service
- notesy::json: Reading and writing JSON
- notesy::toml: Reading and writing TOML
- notesy::yaml: Reading and writing YAML, and a note's front matter
- notesy::time: Now, written in the user's time zone, dates read, how long ago
- notesy::math: Trigonometry and the like, for drawing
- Names: Icon, Color, Tone, Side, Method, Command, Zone, Event: Notesy's names as enums
- notesy::preview: Its own screens for notesy preview
- notesy::perf: Timing its own work
- notesy::drawings: Drawings' shapes, and buttons in their tool strip
- notesy::sound: Playing sounds, and making them as it runs
- notesy::tex: Math macros for every note's formulas
- notesy::views: Side panels, tabs of its own, and its part of the tree's hover cards
- notesy::zones: Notesy's own places — its menus, its bars and its headings