Lokyr
Documentation

quick-tips: a tip at the start

On this page

lokyr/quick-tips · bundled · source

A tip as Lokyr starts, once a week at most, or as often as every says, in a card at the window's bottom right: a shortcut as your keymap binds it now, a feature that shows in no menu, or a command of a plugin that you installed.

The card

Adding a tip

Each action, feature or shortcut that Lokyr gains has its tip, in the same change:

  1. Its text in locales/en/quick-tips.ftl, the source, and in each other language's catalog: a message tip-<name>, of { $keys } where it names a command's keys, and { $also } where it names a second command's, never the keys written out, which a binding of other keys would make wrong, one or two sentences, as two lines of the card show them before More.
  2. Its entry in CURATED, in src/lib.rs, the most useful first: command(id, message, command, argument) for a command's keys, which shows only while a key is bound to it, and(tip, command, argument) around it for a second command's, which shows only while both are bound, or plain(id, message) for a feature that needs no keys, and needing(command, tip) around either for a feature of a plugin that may be off, as Blocks, which starts off: the tip shows only while that command is there; the id, which the plugin's state keeps, never reused.
  3. The plugin's tests check that every tip has its message in every catalog, that each names { $keys } and { $also } as its commands do, and that the ids are unique.

A plugin's own commands of no parameters have their tips by themselves, of their titles.

Commands

CommandTitleKeysWhat it does
quick-tips.showShow a TipShows the next tip at once, whatever the week and Don't show again

Config

[plugins.quick-tips]
every = 7

Turning it off

[plugins.quick-tips]
enabled = false

No tip shows, at the start nor by its command.

Permissions

It reads the commands' names and titles and their keys, as the plugin API lets every plugin, and needs no capability.