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

--replaces-process fails when keeping triggering button pressed #11

Open
Schmoho opened this issue Jul 15, 2020 · 2 comments
Open

--replaces-process fails when keeping triggering button pressed #11

Schmoho opened this issue Jul 15, 2020 · 2 comments

Comments

@Schmoho
Copy link

Schmoho commented Jul 15, 2020

Obviously this is an integration issue, so I'll have to mention some context on other programs, I hope you'll bear with me.

The setup is using sxhkd with the following rule:

XF86AudioLowerVolume
    volcontrol.sh dec

with volcontrol.sh being

#!/bin/sh
if [ "$1" == "dec" ]; then
    pamixer -d 5
fi

VOLUME=$(pamixer --get-volume)

notify-send.py "Volume" "$VOLUME%" \
                         --hint boolean:transient:true \
                         --replaces-process "volume-popup"

You noted on --replaces-process
"If called with this parameter notify-send.py might block, best to be called with a trailing &."
so I tried both variants, behaviour is the same.

When I keep XF86AudioLowerVolume pressed for a while and then release it, I get a stack of notifications by deadd-notification-center.

I can only assume this is due to some state management issue,
i.e. this seems relevant: notify_send_py.py#L114

Unfortunately I can't really judge in what way this is most appropriately solved or even just what the actual problem seems to be.

I noticed that in your .dotfiles repo you use a script deadd-volume-dec, I can only assume that's basically what's showcased on the deadd github-page?

I'd appreciate any input as to if that is a somewhat familiar problem.

@Schmoho Schmoho changed the title --replaces-process fails when keeping XF86AudioLowerVolume pressed --replaces-process fails when keeping triggering button pressed Jul 27, 2020
@phuhl
Copy link
Owner

phuhl commented Dec 11, 2020

Hi, thanks for reporting.

I am aware of a similar behavior, where it sometimes prints multiple notifications. But for me it doesn't seem like it is caused by holding the volume button pressed (and thus sending multiple notis in rapid succession) but something else, I am not aware of.

I noticed that in your .dotfiles repo you use a script deadd-volume-dec, I can only assume that's basically what's showcased on the deadd github-page?
Yup, usually works for me, with the quirk described above.

I don't have a better clue here, than you, sadly. If you find out more about it, feel free to comment or open a PR :)

@phuhl
Copy link
Owner

phuhl commented Dec 11, 2020

And sorry for the late reply

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

No branches or pull requests

2 participants