diff --git a/desktop/.config/waybar/config b/desktop/.config/waybar/config index 0d72df1..8b3dcf2 100644 --- a/desktop/.config/waybar/config +++ b/desktop/.config/waybar/config @@ -64,6 +64,7 @@ "format": "{icon}{0}", // issue tracked here https://github.com/Alexays/Waybar/issues/3623 "format-icons": { "event": "", + "event-today": " ", "no-event": "", }, }, diff --git a/desktop/.config/waybar/modules/khal.py b/desktop/.config/waybar/modules/khal.py index 6dc3971..76f4280 100755 --- a/desktop/.config/waybar/modules/khal.py +++ b/desktop/.config/waybar/modules/khal.py @@ -27,13 +27,16 @@ for line in lines: if len(clean_line) and clean_line[0] not in ["0", "1", "2"]: clean_line = "\n<b>" + clean_line + "</b>" new_lines.append(clean_line) + output = "\n".join(new_lines).strip() -data["alt"] = "no-event" -data["tooltip"] = output - -if today in output: +if today in output: # an event today! + data["alt"] = "event-today" data["text"] = output.split("\n")[1] +elif output: # an event in the week! data["alt"] = "event" + data["tooltip"] = output +else: # no events + data["alt"] = "no-event" print(json.dumps(data))