diff --git a/desktop/.config/waybar/config b/desktop/.config/waybar/config index 81d4e74..e0d7ca1 100644 --- a/desktop/.config/waybar/config +++ b/desktop/.config/waybar/config @@ -49,12 +49,16 @@ "on-click-right": "$TERMINAL start --class float glances" }, "custom/events": { - "format": "{}", - "interval": 300, - "exec": "~/.config/waybar/modules/khal.py 2>/dev/null", "exec-if": "command -v khal >/dev/null 2>&1", + "exec": "~/.config/waybar/modules/khal.py 2>/dev/null", "return-type": "json", - "on-click": "$TERMINAL start --class float ikhal" + "interval": 300, + "on-click": "$TERMINAL start --class float ikhal", + "format": "{icon}{}", + "format-icons": { + "event": " ", + "no-event": "", + }, }, "memory": { "interval": 30, @@ -138,7 +142,7 @@ "tag-labels": [ "", "", "", "", "", "", "", "", "", "" ] }, "river/mode": { - "format": "{} 󱐁", + "format": "{} ", }, "river/window": { "format": " {}", @@ -172,10 +176,10 @@ "interval": 60, }, "custom/vidl": { - "format": "{} {icon}", + "format": "{icon}{}", "format-alt-click": "right", "format-icons": { - "default": "" + "default": " " }, "exec": "wc -l ~/.local/share/vidl/vidl_queue | cut -d' ' -f1", "exec-if": "[ -f ~/.local/share/vidl/vidl_queue ]", diff --git a/desktop/.config/waybar/modules/khal.py b/desktop/.config/waybar/modules/khal.py index 8cff47d..6dc3971 100755 --- a/desktop/.config/waybar/modules/khal.py +++ b/desktop/.config/waybar/modules/khal.py @@ -29,11 +29,11 @@ for line in lines: new_lines.append(clean_line) output = "\n".join(new_lines).strip() -if today in output: - data["text"] = " " + output.split("\n")[1] -else: - data["text"] = "" - +data["alt"] = "no-event" data["tooltip"] = output +if today in output: + data["text"] = output.split("\n")[1] + data["alt"] = "event" + print(json.dumps(data))