Commands - chrisgurney/obsidian-note-toolbar GitHub Wiki

Note Toolbar includes a few helpful commands, accessible via Obsidian's command palette.

[!tip] Assign a keyboard shortcut to any of these commands in Obsidian, via Settings > Hotkeys, or add them to any toolbar directly. Use Note Toolbar URIs to execute them from Note Toolbar Callouts.

For items and toolbars

Add a command for any toolbar you would like to open (in a Quick Tools window) or for any item you would like to execute.

For toolbars, toggle the Add toolbar command setting in the toolbar's settings to enable the command.

For items, use the item action menu to add the command.

Notes

  • Hotkeys assigned to toolbar or item commands will show in the toolbar and item lists in settings respectively, in item tooltips, and in menus. (Only the first mapped hotkey is shown.)
  • For items:
    • If the label and tooltip are empty, you won't be able to add the item, or it will be removed.
    • If the label uses variables or expressions, the tooltip will be used instead; if the tooltip's empty, or also has variables, the command won't be able to be added.

Keyboard accessibility

Focus

Puts keyboard focus within the toolbar. You can then navigate between items using the arrow keys, and click using enter or spacebar.

[!tip] Open File items via keyboard in various views, but only if these hotkeys are not already mapped in Obsidian's settings:

  • in a new tab via cmd (macOS) / ctrl (Windows/Linux) and enter; or
  • in a split view via cmd+option (macOS) / ctrl+alt (Windows/Linux) and enter

Settings access

Plugin settings

Opens the main plugin configuration.

Toolbar settings

Opens the settings for the toolbar on the present note, if there is one.

[!tip] You can also right-click anywhere on a (non-callout) toolbar to edit the toolbar, or for access to settings.

Quick tools and toolbar access

Open: YOURTOOLBARNAME

For fast access to a specific toolbar, open any toolbar's settings, and enable Add toolbar command.

A new command will be added (Note Toolbar: Open: YOURTOOLBARNAME) that will let you open that toolbar in a Quick Tools window.

[!tip Next, assign a hot key to that command for convenient access to that toolbar.

Quick tools

Opens a Quick Tools window with all of your tools across all of your toolbars. Select an item and it will use it as if you triggered it from the toolbar.

Quick tools (for current toolbar)

Opens a Quick Tools window that shows the items in the toolbar associated with the current note.

[!tip] On mobile, consider adding this command to the editor toolbar: Settings → Toolbar → scroll to the bottom of Manage toolbar options → Add global command

Quick toolbars

Opens a Quick Tools window with all of your toolbars. Select a toolbar and it will open a window with the tools in just that toolbar.

Read more about how it works in Quick Tools.

Note Toolbar Callout helpers

Copy URI for command

Lets you select a command and then copies its URI to the clipboard. Example output:

obsidian://note-toolbar?command=workspace:toggle-pin

Copy callout item for command

Lets you select a command, and then copies a Note Toolbar Callout line to the clipboard. Example output:

[]()<data data-ntb-command="workspace:toggle-pin"/> <!-- Toggle pin -->

...then all you need to do is choose what the item should look like in the link's text ([]).

Properties helpers

Toggle Properties

Completely expands/collapses the Properties section. Works great when added to a toolbar!

Notes:

  • When expanding Properties, the command also completely unfolds the Properties heading (by emulating a click on it).
  • Closed properties seem to stay maintained if operating within the same tab. Opening a new tab requires the close to be run again.
    • Note that vanilla Obsidian remembers your fold preference on save (which includes Properties), though this only seems to work in Reading/Preview mode (as of Obsidian v1.5.12).

Fold Properties

Folds the Properties section closed.

[!tip] Use the Note Toolbar: Show Properties command to unfold the Properties heading.

Hide Properties

Completely hides the Properties section from view.

Show Properties

Shows (if hidden) and expands/unfolds the Properties heading, if it's closed.


Read next: Accessibility