i3status-rust
i3status-rust copied to clipboard
Notification counts and show messages
Left-clicking on this block will show notifications. Right-clicking on this block will enable/disable notifications.
Add flag so that when there are notifications you could show the number of events. Set widget state if there are notifications.
Depends on dunst-project/dunst#1127 for dunst notification count.
Please let me know if you have any thoughts on the design, format variable names, if there's any other clever way to not need the notifications
flag to achieve the same goal, or widget states.
I like the idea, but I'm a bit worried about changing click behavior. Hopefully #1519 will improve the situation.
Add flag so that when there are notifications you could show the number of events
Alternatively, $notification_count
can be present only when it's nonzero. Then " $icon{$notifications{($notification_count.eng(1))}|} "
becomes " $icon {($notification_count.eng(1)) |}"
.
I like the idea, but I'm a bit worried about changing click behavior.
I understand the worry about changing the click behavior. It seems like it's more natural to left click to see existing/old notifications and right click to mute notifications.
Alternatively, $notification_count can be present only when it's nonzero.
Thanks, that's definitely a lot less messy looking.
I added in the waitingCount to the total notification_count
too. (FWIW this matches what swaync provides in its NotificationCount
)
I was thinking about the states... If you're paused/dnd does that mean that the state should be more severe (warning or critical) than if you weren't paused/dnd?
@MaxVerevkin, I tested this with #1686 and that seems like a good solution for allowing actions to be remapped.
dunst-project/dunst#1127 has been merged!
I left the show
action unmapped and left the left mouse mapped to toggle_paused
. Let me know if there's anything you think that should be changed/reworked.
Also, should we add a note in the docs that notification_count does not work properly for dunst <=1.9.0?
Yes
Thanks for working on this and fixing dunst
along the way!
You're welcome!