-
Notifications
You must be signed in to change notification settings - Fork 344
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
Proposal: Show action count in notifications #1218
Comments
Following the discussion in #1126 I would like to propose a way to give the users the ability to customize indicators in a backwards compatible way. Disclaimer: I know that this is a more complicated proposal, but please read till the end for considerations. We can add a few settings for different situations:
These values are themselves formattable and the user can customize them however they want. Then they will be added to the notification via format as they see fit. Note that the values for the format will be empty if the situation is not applicable, so only the right string is printed. To improve things even further we can add few format options that describe the current notification. For example
Up to this point everything is very easy to implement and although it adds a bit of variants to format strings it simply replaces things to integer values. Note: format names are to decide Now I will propose another improvement to format that will make a lot of things easier. We can also add a way to conditionally include text depending on the situation. For example we could use this syntax This allows the user to customize the format even more. But it has also a practical effect. We can now implement show_indicators with our new system. Here's how:
(Then we prepend "(%A%U%C%D)" to Even if this proposal is discarded I hope that my idea might be useful to improve the current indicators system.✌️ |
@bynect some questions and observations about your ideas: Observations
Questions
|
Hello, first of all thanks for your quick response. I will start by saying that if we implement the conditional printing, we don't reallu need the creation of the different indicator string. In fact we can create a single Obviously inside the indicator format we disable the expansion of itself to avoid recursion. So now we still have a format option for indicators (like %D). Then we have the other options:
This obviously get defined only when the situation allows them (furthermore we may think about restricting their usage in indicator_format). So now the show_indicators would simply prepend this to format Practically this would be
That replaces the behavior of show_indicators. Regarding your questions:
|
Also, regarding the event rule you mentioned, I don't see the format indicator idea conflicting. If anything we could make the format_indicator change based on an event rule. And for your idea to keep it simple and don't add to much now. I know that it makes sense to do so. However I think that if we are going to deprecate show_indicators we should add a proper alternative that allows customization. Actually, for your idea to add |
Yeah, I like that idea. It keeps backward compatibility, is simple and allows for more options. More styles like an emoji style could be added later if people want it |
Users want to know how many actions a notification has so they can choose how to intreract with it (see #509, #1150 and #1216).
We could add a setting
show_actions
, configurable to one of these four settings:none
: No information regarding actions will be displayed (falls in line with deprecatingshow_indicators
)minimal
(default): If the notification has one action or more, the action_indicator is displayed.This is the current dunst behavior. Example: (A)
extended
: Shows the action_indicator when there's one action, adds an additional + if there are two or more.Example: (A+)
full
: If the notification has one action, shows "(1 action)", if there are more the plural is used, e.g. "(3 actions)"For all these configurations, when there are no actions available no text is added to the notification.
The text was updated successfully, but these errors were encountered: