dunst
dunst copied to clipboard
Allow setting individual border's properties
Hello, i am trying to rice dunst's notification borders and would like to customize the properties of a particular edge.
In particular, i am trying to achieve the following look
Reading the docs, i get the impression that this is not currently possible. But I believe it will be a good feature to allow customizing the:
- Width of individual borders
- Color of individual borders
- And perhaps, the dash style for individual borders
It's indeed not possible to customize individual borders. I believe mako does support that if you run wayland.
It shouldn't be too hard to implement. If anyone wants to implement this, it's good to know how the configuration would look like. Do you have suggestions on that?
Thank you for responding this quickly. I am not a C programmer but reading the code (draw.c), it does seem easy to implement.
One way is to keep the frame_width
setting and add more properties like frame_right_width
, frame_left_width
. Setting frame_width
sets all the borders.
However i would argue that frame_width
is not the best term to describe borders. So, i suggest we use properties from css.
border_right_width = 4
border_right_color = "#rrggbb"
# border_width = 2 will override the previous settings
so on so fourth.
Since deprecating frame_*
will be a breaking change, for now we can make them an alias for border_*
.
Instead of adding a new setting key you could also change frame_width
to allow a list of numbers.
E.g.
frame_width= (1,2,3,4) # set all borders individually
frame_width=1 # set all borders at once
It would also be good to look at mako's configuration to see how they do it. I believe they do something similar.
Hmm that sounds like a good solution but dunst allows overriding settings based on urgency and rules (if i understand this correctly). So, consider the case where all the borders have been set to have some colors like
# (I'm assuming the order as: top right bottom left)
frame_color = ("red", "red", "blue", "blue") # for example
now, if for certain urgency and rules, someone wants to adjust the bottom and left borders they will have to restate top and right for no reason
frame_color = ("red", "red", "black", "black")
And they will have to do that for every special rule they make and urgency. Which is a bad experience and a lot of copy/pasting for no reason.
Having separate settings for each border won't have theses issues.
That's true. You could also allow empty values for keeping the old color:
frame_color = ( , , , "red")
But yeah, it could be discussed more when someone wants to implement it :)
I am planning an overhaul of dunst frame drawing