Module hilbish.messages

Sidebar

  • Lunacolors
  • Introduction
  • Completions
  • Frequently Asked Questions
  • Getting Started
  • Options
  • Features
  • Runner Mode
  • Notification
  • Signals
  • Signal
  • Command
  • Hilbish
  • Vim Mode
  • Actions
  • Module bait
  • Module terminal
  • API
  • Module fs
  • Module commander
  • Module snail
  • Module hilbish.aliases
  • Module hilbish.abbr
  • Module hilbish
  • Module hilbish.userDir
  • Module hilbish.messages
  • Module hilbish.runner
  • Module hilbish.history
  • Module hilbish.jobs
  • Module hilbish.editor
  • Module hilbish.module
  • Module hilbish.os
  • Module hilbish.completion
  • Module hilbish.timers
  • Module dirs
  • Nature
  • Module doc

Module hilbish.messages

Introduction

The messages interface defines a way for Hilbish-integrated commands, user config and other tasks to send notifications to alert the user.z The hilbish.message type is a table with the following keys: title (string): A title for the message notification. text (string): The contents of the message. channel (string): States the origin of the message, hilbish.* is reserved for Hilbish tasks. summary (string): A short summary of the text. icon (string): Unicode (preferably standard emoji) icon for the message notification read (boolean): Whether the full message has been read or not.

Functions

unreadCount() Returns the amount of unread messages.
send(message) Sends a message.
readAll() Marks all messages as read.
read(idx) Marks a message at idx as read.
delete(idx) Deletes the message at idx.
clear() Deletes all messages.
all() Returns all messages.

hilbish.messages.all()

Returns all messages.

Parameters

This function has no parameters.


hilbish.messages.clear()

Deletes all messages.

Parameters

This function has no parameters.


hilbish.messages.delete(idx)

Deletes the message at idx.

Parameters

idx number


hilbish.messages.read(idx)

Marks a message at idx as read.

Parameters

idx number


hilbish.messages.readAll()

Marks all messages as read.

Parameters

This function has no parameters.


hilbish.messages.send(message)

Sends a message.

Parameters

message hilbish.message


hilbish.messages.unreadCount()

Returns the amount of unread messages.

Parameters

This function has no parameters.