<spanclass=navbar-toggler-icon></span></button><divclass="collapse navbar-collapse"id=navbarSupportedContent><ulclass="navbar-nav me-auto mb-2 mb-lg-0"><liclass=nav-item><ahref=/Hilbish/class=nav-link>Home</a></li><liclass=nav-item><ahref=/Hilbish/install/class=nav-link>Install</a></li><liclass=nav-item><ahref=/Hilbish/docs/class=nav-link>Docs</a></li><liclass=nav-item><ahref=/Hilbish/blog/class=nav-link>Blog</a></li></ul></div></div></nav></header><style>@media(min-width:768px){.sidenav{width:240px}}</style><divclass=row><navclass="navbar-expand-md bg-light sidenav border-end"><divclass=container><divclass="collapse navbar-collapse"id=navbarSupportedContent><navclass="navbar navbar-expand-md bg-light sidenav col"style=margin-top:-20px><ulclass="navbar-nav me-auto mb-2 mb-lg-0 flex-column col mt-4"><liclass=nav-item><ahref=/Hilbish/docs/class=nav-link><strong>Introduction</strong></a></li><liclass=nav-item><ahref=/Hilbish/docs/getting-started/class=nav-link><strong>Getting Started</strong></a></li><liclass=nav-item><ahref=/Hilbish/docs/faq/class=nav-link><strong>Frequently Asked Questions</strong></a></li><liclass=nav-item><ahref=/Hilbish/docs/features/class=nav-link><strong>Features</strong></a></li><ulstyle=list-style:none><liclass=nav-item><ahref=/Hilbish/docs/features/notifications/class=nav-link>Notification</a></li><liclass=nav-item><ahref=/Hilbish/docs/features/runner-mode/class=nav-link>Runner Mode</a></li></ul><liclass=nav-item><ahref=/Hilbish/docs/api/class=nav-link><strong>API</strong></a></li><ulstyle=list-style:none><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.aliases/class=nav-link>Interface hilbish.aliases</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.completions/class=nav-link>Interface hilbish.completions</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.editor/class=nav-link>Interface hilbish.editor</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.history/class=nav-link>Interface hilbish.history</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.jobs/class=nav-link>Interface hilbish.jobs</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.os/class=nav-link>Interface hilbish.os</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.runner/class=nav-link>Interface hilbish.runner</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.timers/class=nav-link>Interface hilbish.timers</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/hilbish.userdir/class=nav-link>Interface hilbish.userDir</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/bait/class=nav-link>Module bait</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/commander/class=nav-link>Module commander</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/fs/class=nav-link>Module fs</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/hilbish/class=nav-link>Module hilbish</a></li><liclass=nav-item><ahref=/Hilbish/docs/api/terminal/class=nav-link>Module terminal</a></li></ul></ul></nav></div></div></nav><containerclass="col mt-2"style="padding-left: 20px; padding-right: 20px;"><div><h1>Notification</h1><p><em>Last updated Jul 10, 2023<br>Get notified of shell actions.<br></em></p><p>Hilbish features a simple notification system which can be
used by other plugins and parts of the shell to notify the user
of various actions. This is used via the <code>hilbish.message</code> interface.</p><p>A <code>message</code> is defined as a table with the following properties:</p><ul><li><code>icon</code>: A unicode/emoji icon for the notification.</li><li><code>title</code>: The title of the message</li><li><code>text</code>: Message text/body</li><li><code>channel</code>: The source of the message. This should be a
unique and easily readable text identifier.</li><li><code>summary</code>: A short summary of the notification and message.
If this is not present and you are using this to display messages,
you should take part of the <code>text</code> instead.</li></ul><p>The <code>hilbish.message</code> interface provides the following functions:</p><ul><li><code>send(message)</code>: Sends a message and emits the <code>hilbish.notification</code>
signal. DO NOT emit the <code>hilbish.notification</code> signal directly, or
the message will not be stored by the message handler.</li><li><code>read(idx)</code>: Marks message at <code>idx</code> as read.</li><li><code>delete(idx)</code>: Removes message at <code>idx</code>.</li><li><code>readAll()</code>: Marks all messages as read.</li><li><code>clear()</code>: Deletes all messages.</li></ul><p>There are a few simple use cases of this notification/messaging system.
It could also be used as some “inter-shell” messaging system (???) but
is intended to display to users.</p><p>An example is notifying users of completed jobs/commands ran in the background.
Any Hilbish-native command (think the upcoming Greenhouse pager) can display