waybar: Fix display when there is no event

upower
Simon Bruder 2021-07-18 08:38:05 +02:00
parent 5e4d888da7
commit 8dafa364e0
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ in
events_today = khal(["list", "today", "today", "-df", ""]).rstrip().split("\n")
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:
text = " "
else: