📜 ⬆️ ⬇️

Improving notify-send. Adding a new message to the previous one

A few versions ago in Ubuntu a new notification system appeared - libnotify. It provides an unobtrusive way to communicate something to the user without interfering with his work.
But for all its merits, there are drawbacks. For example, the fact that they are not clickable confuses a large number of users. And also - if you receive several such messages, they will be shown in a row at intervals of 10 seconds. And now we will try to partially fix it.


In search of a solution to this problem, I came across a very interesting article from Dima : How to properly configure Skype pop-up notifications under Ubuntu

Having tried this method, I slightly redid its source code to use any application icon instead of a constant Skype.

In fact, I changed just one line - with notify-send output.
Download the script from here: Download notify-send-ex.tar.gz from exfile.ru
Extract the archive to / usr / bin or / usr / local / bin to taste.
Next, add to autoload (ubuntu: System - Options - Running applications) new item:
Name: notify-ex-server
Command: /usr/bin/notify-append-server.py
')
Click "Close".

Now press Alt + F2 and write /usr/bin/notify-append-server.py

Next, we use to send a notification instead
notify-send "Caption" "Text" -i Application
such a command
notify-send-ex "Caption" "Text" Application
And new messages will be added to the end of the previous ones.

How it works can be read on the website of the author of the script by the link that I gave at the beginning of the article.

Thank you for your attention =)

PS Partly as a supplement to the article Simple Control Music Player Daemon on the Gnome Panel

Source: https://habr.com/ru/post/87471/


All Articles