Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting individual border's properties #1136

Open
keogami opened this issue Jan 4, 2023 · 6 comments
Open

Allow setting individual border's properties #1136

keogami opened this issue Jan 4, 2023 · 6 comments
Labels

Comments

@keogami
Copy link

keogami commented Jan 4, 2023

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
image

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:

  1. Width of individual borders
  2. Color of individual borders
  3. And perhaps, the dash style for individual borders
@fwsmit fwsmit added the Feature label Jan 4, 2023
@fwsmit
Copy link
Member

fwsmit commented Jan 4, 2023

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?

@keogami
Copy link
Author

keogami commented Jan 4, 2023

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_*.

@fwsmit
Copy link
Member

fwsmit commented Jan 4, 2023

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.

@keogami
Copy link
Author

keogami commented Jan 4, 2023

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.

@fwsmit
Copy link
Member

fwsmit commented Jan 4, 2023

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 :)

@bynect
Copy link
Member

bynect commented Mar 5, 2024

I am planning an overhaul of dunst frame drawing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants