26

I use Jupiter as a power manager. Now I get a good number of notifications from it. I do not have problem with the fact that I get all these notifications.

I do however, want to be able to clear all gnome shell notifications with a few clicks. Currently, my entire bottom edge of the screen is filled with notifications and I do not wish to clear each item one by one.

So my question is, how do I clear these notifications? If this is not possible in the ui, is it possible to write an extension to do it? Where should I suggest this feature to gnome developers? Gnome forums are almost dead now, the administrator has not activated my created account since 5 days!

pomsky
  • 70,557
aatish
  • 817

4 Answers4

26

Shamelessly using this workaround from the Fedora forums here.

You can reset the gnome-shell by typing Alt+F2, entering r and hitting enter. This resets/restarts the GNOME Shell and so clears all notifications.

Eliah Kagan
  • 119,640
17

If this is still bothering you, I've found a workaround for using jupiter. The trick is to add the transient hint to the notifications that jupter sends.

For me (installed jupiter via webupd8 ppa on 11.10), the appropriate file to modify is /usr/lib/jupiter/scripts/notify

For my setup, the change I had to make was to add --hint int:transient:1 to every call of notify-send within the script. Thus, my jupiter notify script changed from:

    function notify {
      if [ ! "$NO_NOTIFY" = "1" ]; then
        ICON=$2
        MESSAGE=$1
        if [ "$DISTRIB_RELEASE" = "9.10" ]; then
          DISPLAY=:0.0 /usr/bin/notify-send -i $ICON -t 1500 "$MESSAGE" 2>/dev/null
        else
          USER=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
          USERCNT=$(who | wc -l)
          if [ ! "$(whoami)" = "$USER" ]; then
            if [ ! "$USERCNT" -lt 1 ]; then
               su $USER -l -c "DISPLAY=:0.0 /usr/bin/notify-send -i $ICON -t 700 \"$MESSAGE\" 2>/dev/null"
            fi
        else
            if [ ! "$USERCNT" -lt 1 ]; then
             /usr/bin/notify-send -i $ICON -t 700 "$MESSAGE" 2>/dev/null
            fi
          fi
        fi
      fi
    }

to:

    function notify {
      if [ ! "$NO_NOTIFY" = "1" ]; then
        ICON=$2
        MESSAGE=$1
        if [ "$DISTRIB_RELEASE" = "9.10" ]; then
          DISPLAY=:0.0 /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 1500 "$MESSAGE" 2>/dev/null
        else
          USER=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
          USERCNT=$(who | wc -l)
          if [ ! "$(whoami)" = "$USER" ]; then
            if [ ! "$USERCNT" -lt 1 ]; then
               su $USER -l -c "DISPLAY=:0.0 /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 700 \"$MESSAGE\" 2>/dev/null"
            fi
        else
            if [ ! "$USERCNT" -lt 1 ]; then
             /usr/bin/notify-send --hint int:transient:1 -i $ICON -t 700 "$MESSAGE" 2>/dev/null
            fi
          fi
        fi
      fi
    }

This isn't really a direct answer to your question, since this won't clear all notifications, but it will at least prevent the jupiter ones from stacking up.

Hope this helps!

jat255
  • 728
5

As far as I know there is currently no way of clearing all the notifications in gnome-shell. Is your bottom screen like this? (not Firefox, but any applications flooding the lower panel)

enter image description here

I tried searching all the design documents on wiki and still cannot find any design or spec for clearing all the notification.

You can request this feature by opening a bug report here


Extra Info: Clearing in Unity

This is one use case where passive notifications with App Indicator makes a lot of sense. You don't need to be bothered with notifications pilings up. Those notifications which need your attention show in app indicator and can be cleared

enter image description here

Manish Sinha
  • 11,671
-1

Click on any notification and it will disappear unless it has menu of its own (informational versus minimized app).

Eliah Kagan
  • 119,640
wisemonkey
  • 3,483