-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add i3-nagbar style popups for important notifications #4
base: master
Are you sure you want to change the base?
Conversation
…agbarInterceptor.
Unfortunately I have still been unable to focus the nagbar window.
I also tried I took a look at the i3 source, and found this code for checking the next focused container with a comment saying that docks cannot be focused. A possible solution would be to define a notification binding mode, such that keys (i.e. the number keys) send an IPC message to select an option.
This seems perfectly doable, but overly complex. |
Here is an implementation of the above idea. It adds an i3 mode which sends 1-9 to the notification bar on Here's a video (YouTube link) of the nagbar using an i3 mode. Since ... perhaps I should just have switched to |
How is this going? Are you still working on it or dropped it? I'm afraid to install dunst and break something as apt says that installing dunst will REMOVE regolith-rotification, and I don't know if there something using rotification that I'm not aware of. |
@jacksonbenete I haven't touched it since May. The latest version of the popup is here and the latest version of rofication is here. It's now 10 commits behind, and there were quite extensive changes here. My notifbar implementation should still work, but I'm not planning on supporting it. |
@tpb1908 This still is a work in progress? I really would like visible notifications. My use case is when some command takes too much to execute, a notification pops up, but because just shows a new notification in the blocklet, but I really read the notifications there. Something simple, similar to dunst notifications, would do the trick. The problem is dunst don't have the blocklet and the notification queue. |
In response to regolith-linux/regolith-desktop#355 I wrote an extension to rofication to match notifications and provide a visible notification alongside rofication.
I think this is fairly useful, since I find changes to the i3blocks counter easy to miss.
Notification matching
The configuration file defines a list of matchers, each either whitelisting or blacklisting whatever they match. It also defines some flags for other behaviours.
A matcher consists of a line
[!](all|summary|body|application|urgency):[RegEx]
. '!' denoting whether the matcher is a blacklist item, a keyword denoting which part(s) of the notification to match on, and a RegEx string to use for matching.The matchers are executed in the order that they are defined, and the notification is displayed (or not) on the basis of the first matcher which matches.
An example config file:
In order to allow updating the config without restarting the daemon,
pyinotify
is used to watch the config directory (specifically for theCLOSE_WRITE
event).Displaying notifications
The initial mechanism for displaying the notification was
i3-nagbar
. This works nicely withi3
, but isn't really meant for this use, and it doesn't support dismissal through the keyboard because it's meant to be annoying.The nagbar I wrote in Python supports
ActionEvent
through dbus.Without specifying any theming the bar looks like this:
GTK3 seems to be fairly simple to theme. A flatter appearance would match
i3xrocks
better. It would also make sense to use the same urgency based colours asrofication
.Changes to
rofication
The overall system structure doesn't really change, there's just the launching of the bar.
The changes are in
_dbus
and_notification
app_icon
field was added toNotification
for displayRoficationDbusService
takes aDefaultInterceptor
instance and callsintercept
inNotify
If this system is useful to anyone else I'm happy to finish it off and clean it up. In particular, I need to
Interceptor
doesn't crash. I don't expect it to, but when it's executed as part of the notification daemon it should be fault tolerant_interceptor
. The class hierarchy is not really necessary, I'm too used to Java.