-
Notifications
You must be signed in to change notification settings - Fork 343
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
There is a way to enable extglob in dunstrc file #645
Comments
Firstly, we process the values of the rules via
I'm not that familiar with AWK, but maybe you are able to do it. If successful, please report! As a workaround, you could filter inside the script. Watch the parameters:
With special foo, you could work around this. However there is no |
@bebehei I am not familiar with AWK too, then I choose the second one, and the result was Great (at least untill now :) the most difficulty was choose which parameters to use for stop play the sound, And I almost forget thanks these tips help me a lot. If anyone want make a similar feel free to modify my humbly script
|
Which dunst version do you use? 1.4.x or 1.3.x? Master? |
I'm using version 1.4.1 (2019-07-03). |
@tsipinakis shall we enable the |
I'm fine with that though it'll be a challenge on how to document that, a config file would work on one system but break on another depending on libc extension support - not exactly easy to debug from a user perspective. |
As mentioned in #658, this works for scripts but not for any other attributes like overriding the icon. Given the usefulness I now think it's worth the trouble to enable GNU extensions just for I'll look into it tomorrow. |
Argv[2] did not work for me but argv[1] did. notifications.py #!/usr/bin/python
from os import system
from sys import argv
blacklist = ["discord"]
if argv[1] not in blacklist:
system("paplay ~/path/to/alert.wav") dunstrc
|
Hey thank you @dylantjb You improve the readable of my script a lot, you can add these lines: |
It is recommended to use environment variables instead of the arguments passed to the scripts as they may be deprecated soon. (comments in #811). |
In that case I'll provide an updated script for reference. notifications.sh #!/usr/bin/env bash
blacklist=( "discord" "your app here" )
[[ ! " ${blacklist[@]} " =~ " $DUNST_APP_NAME " ]] && aplay "/path/to/sound" dunstrc
Should something like this be added to the wiki? |
Yeah that would be great! |
This enables more advanced regular expression syntax. It can be enabled with `enable_posix_regex`. Fixes: dunst-project#1013 Fixes: dunst-project#645 Fixes: dunst-project#658
This enables more advanced regular expression syntax. It can be enabled with `enable_posix_regex`. Fixes: dunst-project#1013 Fixes: dunst-project#645 Fixes: dunst-project#658
This enables more advanced regular expression syntax. It can be enabled with `enable_posix_regex`. Fixes: dunst-project#1013 Fixes: dunst-project#645 Fixes: dunst-project#658
Regex is implemented in #1017. It should be better than extglob. |
Hi, this is not a bug, just a question to know if is there a way to enable extglob in dunstrc file, I really would to know how enable, I put an spefic sound for all notifications, but some apps have your own notification sound, and when is a notification is fired for these apps play two songs at same time.
I trying to make of following way:
and do not works.
or who knows made a blacklist for spefic apps, I know this could be hard, so would be nice if extglob works :)
The text was updated successfully, but these errors were encountered: