dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Margin / spacing / gaps between notifications?

Open Octelly opened this issue 4 years ago • 4 comments

Is it possible to add some spacing between notifications? I tried producing the desired effect with separator_color = "#00000000", but that doesn't quite achieve what I want. image wired-notify supports this via a gap config setting if I recall correctly. It is also a popular feature among different tiling window managers such as AwesomeWM (beautiful.useless_gap = 5) or QTile (layout property margin=5).

Octelly avatar Jan 07 '22 10:01 Octelly

Needs #1018 before this can be implemented correctly.

fwsmit avatar Jan 26 '22 13:01 fwsmit

I have implemented this feature for myself quickly, you can view the commit/diff here: https://github.com/paddyw2/dunst/commit/436613f0975a5686bdc028f6b46bb61247af036b

It allows me to set these values in the config file:

[global]
    gaps = true
    gap_size = 10

Happy to clean it up and submit a PR, but it sounds like there's some code base refactoring planned first. So in the meantime you might want to try out the edits above and just build and install locally.

paddyw2 avatar Mar 11 '22 23:03 paddyw2

I have implemented this feature for myself quickly, you can view the commit/diff here: paddyw2@436613f

It allows me to set these values in the config file:

[global]
    gaps = true
    gap_size = 10

Happy to clean it up and submit a PR, but it sounds like there's some code base refactoring planned first. So in the meantime you might want to try out the edits above and just build and install locally.

Cool. I'd be happy to accept it as a PR. It's a pretty small patch and when we implement multiple windows, it can be replaced in a backward compatible way. So I see no issues with adding it to master :)

fwsmit avatar Mar 12 '22 22:03 fwsmit

What's good to think about for the PR is mouse clicking to close notifications. I suspect that clicks in between the notifications are getting picked up by dunst. On top of that, the notification height calculation might be off, leading to the wrong notification being closed on click. This calculation should be fixed and it's probably best to ignore clicks that are in between notifications, since that can only really be fixed by multiple windows AFAIK.

fwsmit avatar Mar 12 '22 22:03 fwsmit

I think this has been solved with the gaps option

bynect avatar Feb 21 '24 22:02 bynect