Does there exist "Don't disturb mode" as is does for OSX device, where you can decided when notification can bother you, or not..
I just installed chrome, and I usually get spammed by group texts and other notification, which can be annoying when I try work.. On my macbook I have the option to turn on "Do no disturb" which mutes all form of notication.. Does something like that exist for Ubuntu?
Best Answer
1. Major update
Just finished a completely rewritten version of the indicator (0.9.0). Options now include:
Furthermore many, many improvements on interface and behaviour.
Installing is unchanged (ppa):
2. Old(er) answer
Indicator to mute/show notifications
With the indicator below, you can choose to temporarily switch off notifications:
or show notifications:
How it works
The trick is a simple command, using
dbus-monitor
to intercept upcoming notifications and stop them before they appear.The indicator is a user-friendly "wrapper" to toggle it off and on.
How to set up
As per now (for Trusty, Vivid, Wily, Xenial):
This will install globally (including the launcher). Installing via ppa is preferred, since it maintains the latest version, and is regularly updated.
The indicator will appear in Dash as NoNotifications
If you install by the ppa, but previously installed manually from below, please run
rm ~/.local/share/applications/nonotif.desktop
first to remove the local.desktop
file.Or manually:
The solution exists of a number of items you simply need to store together in one and the same directory.
The indicator: Copy the script below into an empty file, save it as
nonotif_indicator.py
:The
dbus-monitor
script; save it (exactly) asnonotifs.sh
in one and the same directory as the first script:Make this script executable
Three icons; right-click on each of them and save them together with the two scripts as (exactly):
<--
green.png
<--
red.png
<--
grey.png
That's it. Now test-run the indicator with the command:
and switch notifications on/of
Launcher
In case you'd like a launcher with the indicator:
Copy the icon below, save it as
nonotificon.png
:Copy the code below into an empty file:
Edit the lines:
and
according to the actual paths, and save the file as
nonotif.desktop
in~/.local/share/applications
Add the indicator to Startup Applications
You can add the indicator to Startup Applications: Dash > Startup Applications > Add. Add the command: