electrickite/batsignal

Notification sound

Closed this issue · 3 comments

First of all, this is a great little tool :)

I was wondering, is there some way to also play a notification sound when the battery is low? (I'm using dunst)

batsignal uses libnotify to send messages to your notification server. Looking through the documentation, libnotify does not seem to have a way to suggest a sound to play. You will probably need to configure your notification server to play an appropriate sound.

Hi @electrickite, thanks for your reply! I will try to find if there is a way :)

I got it working by adding the following to my ~/.config/dunst/dunstrc:

[batsignal]
    appname = batsignal
    summary = *
    script = ~/.config/dunst/batsignal_alert.sh

where batsignal_alert.sh is

#!/bin/bash
paplay /usr/share/sounds/freedesktop/stereo/bell.oga