i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Notification counts and show messages

Open bim9262 opened this issue 2 years ago • 4 comments

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.

bim9262 avatar Nov 17 '22 05:11 bim9262

I like the idea, but I'm a bit worried about changing click behavior. Hopefully #1519 will improve the situation.

MaxVerevkin avatar Nov 17 '22 09:11 MaxVerevkin

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)) |}".

MaxVerevkin avatar Nov 17 '22 09:11 MaxVerevkin

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.

bim9262 avatar Nov 18 '22 00:11 bim9262

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?

bim9262 avatar Nov 18 '22 00:11 bim9262

@MaxVerevkin, I tested this with #1686 and that seems like a good solution for allowing actions to be remapped.

bim9262 avatar Dec 23 '22 22:12 bim9262

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.

bim9262 avatar Jan 16 '23 23:01 bim9262

Also, should we add a note in the docs that notification_count does not work properly for dunst <=1.9.0?

MaxVerevkin avatar Jan 17 '23 09:01 MaxVerevkin

Yes

ammgws avatar Jan 17 '23 12:01 ammgws

Thanks for working on this and fixing dunst along the way!

MaxVerevkin avatar Jan 18 '23 18:01 MaxVerevkin

You're welcome!

bim9262 avatar Jan 19 '23 00:01 bim9262