-
Notifications
You must be signed in to change notification settings - Fork 342
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
[meta] Aesthetics & customization #1289
Comments
@fwsmit if you have anything to add feel free or let me know. Could you please add the proper tags to this issue? |
I have a few ideas for improving the theming of Dunst. The default theme of Dunst could be improved (probably some default settings as well). |
Nice👍 I was thinking that when we add multiple windows, different windows/screens could have different themes (so a theme can be chosen by a rule or something like that) For the default themes I like the idea, we could add things like gruvbox out of the box |
I was thinking of adding a theme section which contains all the theme related things for every theme. [theme]
name = whatever
background =
foreground =
corners =
corner_radius =
frame = And then you can use a set_theme to use the theme. And using rules you can still override the theme |
I was thinking about making a |
Well, maybe we can do a combination of the approach? Basically theming is done in a special section of the ini file. And we can split the theme in other config files (like the dunstrc.d). So basically if a user wants to use the theme in the main file he can, otherwise he can create another config file specific to themes. And the syntax is still ini to be consistent. Also, I remembered that in ini the section name should be unique, so maybe we can add subsections for theming. like
|
I have one big perplexity though: should themes be associated with a single notification or with a window? (given that multiple window support will be implemented sooner or later) Because having a theme for every single notification is quite strange for me personally, especially if different notification have themes that are not "compatible" with each other (think: different corners, frames, spacing). So I would say that a theme should be associated with a window and in general be the original source of all the colors and layout, which can then be overridden by the rules. (it would be also interesting to match rules based on theme) edit: [theme AtomDark]
[.low_urgency]
color =
corners =
etc.
[.critical_urgency]
... or this [theme Gruvbox]
low_urgency.color =
low_urgency.background =
low_urgency.corners =
critical_urgency.color =
//... using _ is also fine
normal_background = #fff the above idea are meant to replace low/normal/critical_urgency sections. another possibility is creating multiple low/normal/critical_urgency and matching them against themes. so they are more similar to rules. Every theme then defines the appropriate sections. But either way, I am sure that each theme has to be linked directly to the low/normal/critical_urgency settings. |
Most theming in dunst can be done per notitifcation using rules, so it might make sense to allow the theme to also be set via a rule. It depends on how a theme defines theming rules.
The ini parser doesn't support nested sections I think. And I don't know if that's standard ini syntax.
This one is not backward compatible. Another option is to only allow themes in a separate file. Then the name of the theme could be taken from the filename or something.
Note that it should also be possible to easily change theme. For example from dark mode to light mode. Dunst could even integrate with the desktop api for dark/light theme so this happens automatically. |
The idea was to allow rules to set themes. But the problem I see is that themes may define "general" options that don't change a single notification but the whole window. For example I was thinking of adding a
It is an informal convention and should be added to the parser yes. [theme.atom]
normal_urgency_background =
# different from background and only available in theme sections
# or alternatively
color = (low_urgency_color, normal_color2, critical_color3)
If possible I would avoid these for two reason:
this is surely a design goal. Maybe we can add a All in all, maybe I should focus first on the multiple windows implementation before the theming (for less friction) |
I was watching closely the layout and I noticed several pixel imperfections, which are either caused by cairo antialiasing or by precision error in the drawing code (possibly due to the dpi floating scaling). The white arrow presents no line. I also highlighted in yellow that some lines "bleed" into the frame, in every notification but the first |
For the great joy of the ricing community I want to add some options to customize the look and feel of dunst.
So this is a summary for the customization related issue & prs
Done
Mostly done or WIP
Color gradients (Feature: Color gradient #1273, Gradients #1286 for the progress bar gradient)
Settings reload (proof of concept: dunstctl reload #968 -> [RFC] config reload mechanism #1350)
Possible problems with fractional scaling that result in pixel inaccuracies
cairo_surface_set_device_scale
#1337TODO
X11 refactor Refactoring x11 #477
Themes! Some ideas on the comments below
Percentages as units (Geometry as a percent of screen width #991)
Rework borders and frames (Allow setting individual border's properties #1136 and) so that they can
Custom action and action count format (Proposal: Show action count in notifications #1218 and Custom indicators for URL and Actions #509)
Fix icon size handling (Can't change icon size with enable_recursive_icon_lookup #1086 and Named SVG icons are scaled to max_icon_size #1075)
Allow a custom color or stylesheet for svg/symbolic icons ( Allow customization of SVG fill color #1076 and Allow setting icon colors #994)
Cache icon content by path and timestamp (dunst shows the same icon when the content of --icon is changed #1061)
Fix rectangle artifacts (probably generated during rendering with xlib) (Notifications appear as large boxes #1031 A ghost rectangle is rendered for a split second before the actual notification balloon #1057)
Future ideas
Shadows (Add support for shadows #926)
Gif support (Gif Support #773)
There are some possible improvements to the layout to move some things around (IOS style notifications #741)
Buttons for actions (Clickable buttons for actions? #234)
Notification specific geometry or show on multiple windows (Show Messages on All Monitors #45, Application name based Geometry #265). This will require support for multiple windows [meta] Support multiple windows. #1018
Known problems
Obviously if you have any idea feel free to write here or open an issue with feature request
The text was updated successfully, but these errors were encountered: