From 8dafa364e0dee6490e650d4cb776a30e0d838aa9 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 18 Jul 2021 08:38:05 +0200 Subject: [PATCH] waybar: Fix display when there is no event --- users/simon/modules/sway/waybar.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/users/simon/modules/sway/waybar.nix b/users/simon/modules/sway/waybar.nix index 39f535e..54d9399 100644 --- a/users/simon/modules/sway/waybar.nix +++ b/users/simon/modules/sway/waybar.nix @@ -241,6 +241,9 @@ in events_today = khal(["list", "today", "today", "-df", ""]).rstrip().split("\n") events_2d = khal(["list", "today", "tomorrow", "-df", "{name}, {date}"]).rstrip() + if len(events_today) == 1 and events_today[0] == "No events": + events_today = [] + if len(events_today) == 0: text = " " else: