Replies: 1 comment 1 reply
-
Hey @d3adb5, thanks :)
The userbuttons are the buttons you can specify in the config through All other buttons (i.e., the delete all button, buttons within the notifications) are not userbuttons. This could probably be pointed out a bit better in the Readme.
The user buttons are meant for features like turning on/off Wifi, hence actions that have an on and an off state and a loading state when switching. When you press a userbutton in the notificatin center, it will be put into an intermediate (loading) state (state 2) and the configured command is executed. linux_notification_center/src/NotificationCenter/Button.hs Lines 70 to 76 in 207b5b0 Now, the script has the task to e.g. turn on the Wi-Fi and when it did, to set the button to the correct state (either true or false) through a special notification: # either turn highlighting on
notify-send.py a --hint boolean:deadd-notification-center:true \
int:id:0 boolean:state:true type:string:buttons
# or turn highlighting off
notify-send.py a --hint boolean:deadd-notification-center:true \
int:id:0 boolean:state:false type:string:buttons That will put the button into state 1 or remove both classes. This is done through these functions:
That's what I used to look at, too. That's the official spec anyways. It is not that long ([un]fortunately) so when I want to know support for something I just go through that document and CTRL-F the feature. Usually it is not in there, hence not supported 😅
Certainly. I am not sure why I named them that way, I guess it grew over time. The names are frankly terrible and they could be chnanged, but also respecting backwards compatibility. So the best we could do would be adding new classes to the existing ones. As explained above:
Sure, what do you want to work on? If there is an issue for it already, leave a comment there and maybe a question or two and I will try to give you the relevant hints to get you started. If there is no issue for what you want to do, just open one and we can discuss it in there. To edit (or view) the glade files, I use https://en.wikipedia.org/wiki/Glade_Interface_Designer The libraries used here are documented on hackage and that way give a view into what you can do with GTK. Hope that helps :) |
Beta Was this translation helpful? Give feedback.
-
Hey there, I have a few questions and perhaps suggestions regarding styling notifications outside and inside the notification center. Thank you so much for your work on this project, by the way, @phuhl! I was looking for an alternative to dunst that might provide a more complete desktop notifications experience while remaining standalone (I use XMonad + xmobar and that's it), and decided to switch to deadd.
From what I've gathered, the layouts for the windows are in the
.glade
files on the root of the repository, which I've been trying to use as a guide for writing the CSS I'm using in my configuration. However, as expected, it's not as straightforward as reading some HTML and writing CSS for the browser. Moreover, some classes (e.g..userbutton
,.buttonState1
) aren't present in any of the XML files and are instead added dynamically during execution. Consequently I have some questions:.userbutton
and whatbutton
s are not.userbutton
s?display: flex
).I'm familiar with Haskell, but not so much with GTK, and wonder if you have the time to explain the project structure to point me in the right direction? I really want to contribute to the project.
Beta Was this translation helpful? Give feedback.
All reactions