dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Allow follow mode to be modified by the rule

Open DusanLesan opened this issue 5 years ago • 8 comments

The use case I want is to have monitor = 0 for all notifications except for those that match the rule. I want those to follow the keyboard. Basically I want to mark status bar notifications to follow keyboard but other notifications to remain on primary screen to preserve privacy in case of screen sharing

Example:

[date]
    summary = "date"
    format = "<span stretch="semiexpanded" size="15000">%b</span>"
    background = "#383a3b"
    follow = keyboard

DusanLesan avatar Oct 26 '20 16:10 DusanLesan

To do this dunst needs to be able to handle multiple window/display setups simultaneously. Since a basic assumption is that there is only 1 notification window this would take a lot of effort to implement currently.

I'll keep this open, but I don't expect this to be picked up soon.

tsipinakis avatar Oct 27 '20 11:10 tsipinakis

@tsipinakis @fwSmit I have another idea that might make this issue obsolete if it is possible. I would like to use dunstctl to control follow value during runtime (no saving in config). We would probably need two dunstctl commands, one to get config entry value (or just follow) and one to set it. That would allow me to control Dunst from my wm. For example I would use it like so: [ "$(dunstctl get follow)" = "keyboard" ] && dunstctl set follow "none" || dunstctl set follow "keyboard"

DusanLesan avatar Oct 22 '21 18:10 DusanLesan

It would be cool to set variables via dunstctl, but I think multiple windows has a higher priority, since that solves more issues. You can, of course, already do the same thing in a hacky way by changing the config file and restarting dunst.

fwsmit avatar Oct 23 '21 11:10 fwsmit

@fwSmit Please keep this idea in mind as it may be useful for cases other than following. Regarding the hacky solution, I am already doing that since I created the issue. In my case I only need to kill dunst as it is started automatically when needed.

DusanLesan avatar Oct 23 '21 15:10 DusanLesan