The following Python script is extracted from /usr/lib/python2.7/dist-packages/Mailnag/plugins/libnotifyplugin.py
In the script, the command ('zenity --info --text="You got new mail"')
is not run. How do I make it run? I want it to run when mail_count > 0
The lines under if mail_count > 1:
are run properly.
if mail_count > 0:
import os
os.system('zenity --info --text="You got new mail"')
if mail_count > 1:
summary = _("{0} new mails").format(str(mail_count))
if (mail_count - i) > 1:
body = _("from {0} and others.").format(senders)
else:
body = _("from {0}.").format(senders)
else:
summary = _("New mail")
body = _("from {0}.").format(senders)
I put the following "Testing.py" script into /usr/lib/python2.7/dist-packages/Mailnag/plugins/Testing.py
and ran it, which did bring up the "You got new mail" message.
#!/usr/bin/env python2
import os
os.system('zenity --info --text="You got new mail"')
os.system
? – Stephen Kitt Apr 05 '19 at 09:08