-
Notifications
You must be signed in to change notification settings - Fork 2
Looped sound #116
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
base: main
Are you sure you want to change the base?
Looped sound #116
Conversation
72ca305 to
14d5ce0
Compare
- only one sound plays at a time, even if multiple notifications are pending - sound loops until all notifications are actioned todo: I want to provide the option of looped or oneshot playback needs design work. do we want - cli flag? - config file?
|
the easiest way to handle configuring oneshot vs looped for now is probably to just add an env variable and recommend and add |
|
Actually, I think I'll just change the behaviour to loop and remove the ability to have a oneshot sound. If anyone objects I can add it back in, but there' no reason to complicate things unnecessarily if not |
|
Working well with
It seems like by default dunst automatically closes notifications after a brief period, which cuts the sound short. It's not clear what we can or should do about this from our end. I can't immediately think of any better way of cutting the sound off than tying it to the lifetime of the notification. Especially given that it works well for other notification servers. It's probably a matter of individual user configuration. fwiw dunst also doesn't seem to support the restart button. |
|
Hey I can certainly look more into dunst quirks later if that helps Looking at my scripts, looks like when I've wanted a custom (non-default) time for certain notifiactions, I've used if [ -n "$fullscreen" ]; then
notify-send -t 700 \
--hint=string:x-dunst-stack-tag:volume \
"$label"
fi.. or, in a ^ Here I match the notification by the contents of the notif, I believe. Which is a bit of a hack but couldn't figure what else to do. The latter could be possible for This man page is going to be the best source of info: |
|
Haha yep, I just solved it as you sent that, setting |
|
Nice sounds good!
I do like the oneshot as an idea. Would be nice if for instance a pomodoro user could chime in, that's one case where it may make sense not to need to manually get rid of the notif. Edit: yeah, I guess I'll go ahead and be the one to request it, the more I think of it, the more useful it is :) |
|
righto, good enough for me. Because there's not much to configure yet, I'm a bit reluctant to add the complexity of a config file for now. What do you think about an env variable? |
|
That sounds just fine to me Btw Re: dunst and restart action, there's something called a "context menu" that can be opened on a notif, but I have never once tried this. But seems like the best bet, if any. |
|
The restart button uses "Actions", which it seems like dunst has support for - skimming the dunst docs there's a thing called do_action anyway, it seems like middle clicking on the notification does the restart out of the box
I guess since the notification only provides one action, it must be considered the default, so dunst executes it without you having to specify it by name? |
|
Yeah this is what I know of it:
A shell command, Edit: I didn't know about the middle-click behavior, tried it on a discord message from history, same thing: doesn't do the action, but does the removal part Edit: yes turns out I have a non-default setting for left click: |
Many notification servers have no timeout by default, for which this is unnecessary. However, for servers that do have default timeout (such as dunst), the timeout will cut the looping notification sound short, result in the user potentially missing it. This fixes that issue.
Play sound looped while any elapsed timer has a live notification waiting for interaction
closes #106
closes #90
Todo:
needs design work. do we want
- cli flag?
- config file?
- should it be global or per timer?