Coder Social home page Coder Social logo

rofication's Introduction

Rofication

Rofication is a minimalistic notification system. It is loosely modeled after notification centers on Android and Windows 10. The main idea is to not annoy (e.g. overlap parts of my desktop) but still keep a persistent list of messages. Notifications are useful, however too many notifications showing up too often (e.g. work mail popups) distract from the current task and are therefore dismissed without proper reviewing. The goal is to show (in a single clear place) there are notifications but not pop them up. It is up to the user to review the notifications when time is available. If things are critical one should use a more direct media (e.g. face to face or phone).

To summarize Rofications, it has:

  • 1 point to see if there are notifications. For example the status bar of your Desktop Environment. Notification Bar
  • An application to (re)view all open notifications. Notification Bar
  • Persistent notifications, they stay around until dismissed. They should stick around, even over reboots.

Techniques used

Rofication implements a notification daemon following the Galago Desktop Notification standard. This is used by most Linux desktop environments and most relevant applications support this. It is easily scriptable using notify-send. Rofication aims to be a drop-in replacement for existing notification daemons.

Rofication tries to re-use existing code as much as possible. It uses Rofi for displaying, i3blocks for the unintrusive notification and Python for d-bus implementation of notification daemon.

Structure

The main structure is like depicted below. The daemon acts as a storage point for the dbus messages generated by the applications. The unix-socket interface allows clients to query the storage. A proper protocol still has to be defined.

┌─────────────┐           ┌───────────────────┐                      ┌────────────────┐
│ application │ --dbus--> │ rofication-daemon │ <--- unix-socket --> │ rofication-gui │
└─────────────┘           └───────────────────┘       │              └────────────────┘
                                |                     │             ┌──────────────────────────┐
                                |                     \-----------> │ rofication-statusi3blocks│
                            <hdd:json-db>                           └──────────────────────────┘

The components consist of:

Daemon

Rofication daemon is a small Python script that listens for notification messages on the local dbus. Notifications are internally queued (and preserved) and can be viewed by a client via a unix-socket. It is just a simple storage for notifications.

Notification

Rofication does not implement its own 'widget' to display notifications. Instead it can be easily integrated into existing tools. Currently we ship a small script to integrate into i3-blocks. This shows the number of notifications and signals when there are critical notifications. Ideally there should be several small scripts that implement this for different desktop environments.

GUI

The Rofication GUI consists of a small Python script wrapping Rofi. The GUI allows the user to view notifications, mark them as seen and dismiss them.

CLI

This still needs to be written

rofication's People

Contributors

davedavenport avatar frassmith avatar zeebrommer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rofication's Issues

Ability to let notificaitons overwrite each other

Currently each notification creates a persistent entry. With applications that emit several notifications, this can cause the number of unread notifications to build up in a non-productive way.

For example, spotify has a notification each time a new song starts playing. If you don't dismiss that notification and listen to 10 songs, you'll have 10 notifications that you have to go back and delete.
If it were possible to configure rofication such that a new spotify notification would automatically delete any previous spotify notification, then we could open our notification area and always only see the current/last played song. This is more in line with the behavior we'd expect on mobile or windows 10.

A more advanced version of this would be to have a way to subgroup notifications from applications. For example on slack, having only one outstanding notification per channel would prevent us from having hundreds of notifications outstanding if we were to miss a slack conversation.

Feature request or hint: prevent UI flicker when deleting notifications from Rofi

I <3 Rofication and would like to add it to Regolith. I have been running it for several weeks now and haven't had any issues. One usability problem I face however is that when the python script calls into Rofi to display notifications, and the user does something like delete a notifcation, the flow is that this exits Rofi, back into python, and then loop. This is fine and makes sense except that my Rofi theme is "full screen" and the rapid interaction of deleting notifications is unpleasant due to see. Rofi has a lot of configuration options that I don't fully understand so I hold out hope that there maybe some way that either the deletion logic can be implemented somehow within Rofi to avoid this back-and-forth with the python script (and hence preventing the flicker), or some other approach that escapes me.

Any suggestions?

Different keybinds

I don't think I've ever just wanted to get rid of one notification. It would be cool if I could just hit delete to get rid of them all without the need to hit shift.

I could probably edit the code/script but I'm less comfortable with that than I am editing a config file.

(If this project / you are unaffiliated with the one which ships with Regolith / i3xrocks then maybe you should mention that in the read.me below.)

Ability to focus notifying application

Hi there, I'm enjoying rofication as part of regolith! Thank you for it. When initially trying out the program, I tried to press "enter" on a notification to focus it's originating application, but no action occurred.

If this is a design decision - all good, but an action similar to rofi's window action (to refocus an existing window) would be welcomed.

Custom themes and pinned notifications?

Hi there,
First of all, I really enjoy using rofication (currently using it with Regolith Linux). However, I did have 2 questions about Rofication.

  1. Is it possible to use a different theme with rofication-gui.py compared to the default rofi theme? I'd love a slightly different theme for notifications compared to my grid setup for applications.
  2. Is it possible to have a notification that is pinned until a certain application is closed? I'd have a simple music script that uses notify-send to send basic information about the current song, and I'd like to be able to keep that pinned until I close out of my music player of choice.

Thanks for creating this! I really like it!

Can't view the entire notification

I am using regolith-desktop on Ubuntu 20.04.

The notification feature with Rofication is cool - however the entire notification text is not visible. Unfortunately I am not able to screen capture with the notification panel open, so I can't make a screen shot, but to test:

> notify-send "This is a long notification that we would like to see all of"

Appears as...
This is a long notification that we would...

Is there a config file available to customize this behavior?

xbindkeysrc shortcut to run rofication-gui.py

Hi, a very good impementation of notiufiucations, I think. Thanks.
I'm sure you'll appreciate the importance of running rofication-gui.py form a keyboard shortcut, as I do; I cannot get any usual method to work though. I can get all other rofi, pass and buku scripts to execute from .xbindkeysrc, just not this python script (unlike th e thers which aren't triggering python scripts).

I tried three alternative forms which both work from the terminal:
"/usr/bin/rofication-gui.py" and alternitively,
python3 "/usr/bin/rofication-gui.py",
/usr/bin/python "/usr/bin/rofication-gui.py"

I also tried tried to trigger a bash script:

#!bin/bash
/usr/bin/rofication-gui.py.

Running the bash script above from the terminal give this error, "failed execute child process; permission denied"

The python script runs form a terminal (urxvt), as well as from the rofi drun, even without path specified.
I note tha the python script itself, appears to specify full paths, so no prolem there.
Thanks in advance,
John

Rofication not pulling in notifications

First, this is an awesome solution for desktop notifications. Thank you for sharing it.

I am trying to use it with a budgie/arch install. There is a package in the aur, so i used that. I created a .desktop file in ~/.config/autostart to start the daemon at boot, which seems to be working fine. As far as I know, budgie uses the same protocols to display notifications as gnome.

My problem is i cant get this to pull in any notifications. And I really have no idea how to troubleshoot it. Cant find evidence of problems in any logs.

Any tips would be appreciated. And apoligies for the lack of useful information.

EDIT:

I tried using this on my daily driver which runs gnome. I started the daemon with:

nohup rofication-daemon.py 0<&- &>/dev/null & 

Rofi-top shows the daemon is running. When i try to run the gui via cli, It prints this error:

Traceback (most recent call last):
File "/usr/bin/rofication-gui.py", line 77, in <module>
client.connect("/tmp/rofi_notification_daemon")
ConnectionRefusedError: [Errno 111] Connection refused 

On budgie, where i intend to use rofication, i tried the same process as above, with the same results. Only when I start the daemon from ~/.config/autostart, will the gui start. Though it still wont pull in any notifications.

EDIT 2:

After more digging around, I have concluded rofication will not work with budgie, or maybe more accurately - budgie will not work with rofication. As far as I can understand budgies implementation of desktop notifications is essentially the same as gnome. The notification server is built in and cannot be fully stopped or replaced. I guess I should not be surprised....closing this non-issue.

Way to ignore some notifications?

Hi, thanks for a nice app!

I have a really chatty printer where I work and it keeps advertising itself and I receive constant notification that the printer was added/detected in Rofication i3xrocks. Is there any way to ignore this?

I'm using Ubuntu 20.04.3 with Regolith packages installed.

Deleting notifications sometimes still show up when Rofi comes back

Almost certainly a race condition. Hitting Delete to remove a notification removes that notification and then shows the Rofi window again. But sometimes the notification I just deleted still appears in the list when the Rofi window reappears. In this situation, if I Esc out of Rofi and pop Rofication up again, the notification I deleted is no longer showing. This to me indicates a race condition.

A possible solution might be to save the ID of the most recently deleted notification, and always exclude that ID when showing the current list. This approach is optimistic that the notification system received and processed the delete request, but pessimistic that the operation completed by the time the Rofi UI was redisplayed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.