Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: notifications support #116

Closed
justchokingaround opened this issue Jun 7, 2023 · 6 comments · Fixed by #192
Closed

feat: notifications support #116

justchokingaround opened this issue Jun 7, 2023 · 6 comments · Fixed by #192
Milestone

Comments

@justchokingaround
Copy link

hi, great project, ty very much for making this, you did an amazing job! would it be possible to add support for notifications using notify-send please?

@saygo-png
Copy link

Yes please!

@ulyssa ulyssa added this to the v0.0.9 milestone Jul 7, 2023
@k4r4b3y
Copy link

k4r4b3y commented Jul 13, 2023

+1. I would like iamb work with dunst on debian.

@wrenix
Copy link

wrenix commented Aug 19, 2023

Both is on linux handled by the dbus ... (so dunst, mako, gnome and other should work automatically)

here is a library which look like to handle also other os:
https://docs.rs/notify-rust/latest/notify_rust/#platform-differences

@craftyguy
Copy link

This is based entirely on personal preference, so you may disagree with any/all of it and that's fine :D. I am a "user" though, so I hope it's useful to share this.

Here's a list of notification "techniques" that I've run across over the years, ranked in order from most favorite to least favorite. There's a short explanation with each one about why it is at that position.

  1. run an arbitrary app/script, with param(s) or env vars to communicate data to the app/script. e.g., { "notify-exec": "foo '%m'" } (where %m is a format string, but could be anything).

    • This gives users the greatest amount of flexibility to manage how they want notifications to be handled. Sooo many weechat plugins exist just to provide some specific notification type that could have just been a simple call to an arbitrary script.
    • Examples where this is useful could include blinking LEDs, controlling hardware on notification.
    • iamb could default to something like calling notify-send, so it's compatible with the a lot of systems OOTB (I think.)
    • Probably not as configurable as option number 2 below
  2. use some portable notification library (like libnotify)

    • Supported by a lot of notification daemons and things, so probably would almost always work OOTB
    • Harder to implement exotic notification types from the app. You could probably write an app that listens on dbus for notifications and then does something. But that seems like a lot of work if all you want to do is echo 1 > /sys/class/leds/foo/enabled
  3. emit terminal bel, i.e. tput bel

    • really easy to implement
    • It's more annoying to use it. Some terminal emulators (e.g. foot) could allow running arbitrary commands on bel, but it would be set for all cases where bel is on the term (like apps unrelated to iamb.) There's also no data communicated, so you can't include useful context in the notification, like the room name / message that triggered it.
    • better than nothing, I guess :P

@benjajaja
Copy link
Contributor

Another thing to consider is that e.g. element.io allows setting different notification rules per room etc. so iamb should probably use these settings.

@ulyssa ulyssa linked a pull request Mar 19, 2024 that will close this issue
@justchokingaround
Copy link
Author

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants