1

Is it possible to change the title of a pynotify.Notification? If so what is the method call to use?

Also, it is possible to merge notifications using set_hint_string('append', ''). Is it possible to change a title and keep them merged.

I want something like the following (not real code, just a description of the effect) to happen:

Notification("Something is happening") + Notification("Something is happening") -> Notification("2 things are happening")
david4dev
  • 4,854
  • 2
  • 28
  • 35

1 Answers1

1

Perhaps use the update method:

import pynotify
import time   

pynotify.init('app name')
n=pynotify.Notification("title","Something is happening")
n.show()
time.sleep(2)
n.update("new title","2 things are happening")
n.show()
unutbu
  • 842,883
  • 184
  • 1,785
  • 1,677