waybar: Fix display when there is no event

This commit is contained in:
Simon Bruder 2021-07-18 08:38:05 +02:00
parent 5e4d888da7
commit 8dafa364e0
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -241,6 +241,9 @@ in
events_today = khal(["list", "today", "today", "-df", ""]).rstrip().split("\n") events_today = khal(["list", "today", "today", "-df", ""]).rstrip().split("\n")
events_2d = khal(["list", "today", "tomorrow", "-df", "<b>{name}, {date}</b>"]).rstrip() events_2d = khal(["list", "today", "tomorrow", "-df", "<b>{name}, {date}</b>"]).rstrip()
if len(events_today) == 1 and events_today[0] == "No events":
events_today = []
if len(events_today) == 0: if len(events_today) == 0:
text = " " text = " "
else: else: