Skip to content

expire notification after five seconds in Linux#140

Open
catdevnull wants to merge 1 commit intoFiloSottile:mainfrom
catdevnull:main
Open

expire notification after five seconds in Linux#140
catdevnull wants to merge 1 commit intoFiloSottile:mainfrom
catdevnull:main

Conversation

@catdevnull
Copy link

@catdevnull catdevnull commented Mar 23, 2023

otherwise the notification stays forever which is kind of annoying in DEs that store it indefinitely (like gnome)

a better approach would be to remove the notification after it's been pressed, but notify-send doesn't allow that afaik (using a notification library would)

@9ary
Copy link

9ary commented Apr 7, 2023

a better approach would be to remove the notification after it's been pressed, but notify-send doesn't allow that afaik (using a notification library would)

It seems like notify-send -w would work for that, in that case sending SIGINT will dismiss the notification. It would also be nice to show the notification immediately rather than wait 5 seconds. Maybe passing a timeout of 0 would also be good, so that notification daemons that do implement a default timeout don't dismiss it prematurely.

@catdevnull
Copy link
Author

a better approach would be to remove the notification after it's been pressed, but notify-send doesn't allow that afaik (using a notification library would)

It seems like notify-send -w would work for that, in that case sending SIGINT will dismiss the notification. It would also be nice to show the notification immediately rather than wait 5 seconds. Maybe passing a timeout of 0 would also be good, so that notification daemons that do implement a default timeout don't dismiss it prematurely.

Huh, I didn't know that. See #141

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 this pull request may close these issues.

2 participants