summary refs log tree commit diff
path: root/.config/waybar/modules/timetracked.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/waybar/modules/timetracked.sh')
-rwxr-xr-x.config/waybar/modules/timetracked.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/waybar/modules/timetracked.sh b/.config/waybar/modules/timetracked.sh
new file mode 100755
index 0000000..4963ea0
--- /dev/null
+++ b/.config/waybar/modules/timetracked.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+while true; do
+	timetrace status -o json |
+		jq -c 'if .project == "---" then {} else { text: (["󰔛", .trackedTimeToday] | join(" ")), class: "timetracked", alt: "timetracked" } end'
+
+	sleep 30
+done