dotfiles/scripts/timew.sh
Barna Máté 0be41fd01a added new polybar
its kind of uneven right now thats kind of bothering me but I'll add more modules
new keybinds and scripts for timewarrior (i3, polybar)
2024-05-28 02:36:04 +02:00

13 lines
318 B
Bash
Executable file

#!/bin/sh
# get tracking data
tracking_data=$(timew | head -1)
# get last line, remove spaces and "total"
tracking_time=$(timew | tail -1 | sed 's/ //g' | sed s/.*[total]//)
if [[ $tracking_data == *"There is no active time"* ]]; then
echo "Not tracking anything"
else
echo "$tracking_data | $tracking_time"
fi