waybar: show timewarrior output only if active timer

This commit is contained in:
thomasabishop 2024-04-09 17:11:17 +01:00
parent 1deb2b803d
commit 73eb9366e2
3 changed files with 10 additions and 3 deletions

View file

@ -15,7 +15,7 @@
],
"modules-right": [
"group/timeTracker",
"custom/timewarrior",
"group/workspaceList",
"group/metrics",
"group/clockOutput",

View file

@ -39,7 +39,7 @@ def main():
output["text"] = "Timer running"
output["class"] = "active"
else:
output["text"] = "No timer"
output["text"] = ""
output["class"] = "inactive"
except Exception as e:
output["text"] = "Error"

View file

@ -26,6 +26,7 @@ window#waybar {
}
#timeTracker,
#custom-timewarrior.active,
#workspaceList,
#clockOutput,
#metrics {
@ -108,10 +109,16 @@ tooltip {
border-top: 1px solid #ebdbb2;
border-right: 1px solid #665c54;
border-bottom: 1px solid #665c54;
padding: 4px 8px;
padding: 5px 10px;
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}
tooltip label {
padding: 8px;
color: #282828;
}
#custom-timewarrior.active {
color: #cc241d;
font-weight: bold;
}