Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
499 stars 23 forks source link

feat: message/notification system #219

Closed TorchedSammy closed 1 year ago

TorchedSammy commented 1 year ago

since things can happen while a user is running commands (say a job), i think a unified notifying system would be good to add.

users can then integrate it where they want, an icon in the prompt for example.

TorchedSammy commented 1 year ago

i think this would be a better way to deliver motds and or other changes to people who just do an update without reading anywhere else (or users on master branch honestly..)

TorchedSammy commented 1 year ago

this would throw a hilbish.notification hook which has a message table. valid fields would be:

notifications will be interacted with via the hilbish.messages interface and this could be done entirely in Lua since this system is actually pretty simple

it can provide the following functions:

the difference between marking a notification as read and just deleting it will be up to the user. by default, leaving a notification as read will just leave it but not be visible.

I also think having both message and notification instead of just one makes sense. sending a messages gives the user a notification.

TorchedSammy commented 1 year ago

with the channel idea, the hilbish motd could instead be a message with the hilbish-motd channel.

this can allow the messages to also be a nice relay of changes when updating.