os/+arch (polybar): replace nonsense From headers w/ addresses

This commit is contained in:
Henrik Lissner 2017-05-11 21:41:04 +02:00
parent 7ba112b315
commit 0792506837

View file

@ -39,7 +39,7 @@ def recent_messages(address, password):
obj.logout() obj.logout()
def notify(sender, subject): def notify(sender, subject):
if sender[0] == "?" and "<" in sender: if not sender[0].isalnum() and "<" in sender:
sender = sender.split("<")[1].split(">")[0] sender = sender.split("<")[1].split(">")[0]
os.system("/usr/bin/notify-send {} {}".format(quote("<b>{}</b>".format(sender)), quote(subject))) os.system("/usr/bin/notify-send {} {}".format(quote("<b>{}</b>".format(sender)), quote(subject)))