Add script “timewmenu”

This commit is contained in:
coderkun 2024-01-28 13:09:27 +01:00
commit e197a579ed

13
timewmenu Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
set -e
shopt -s nullglob globstar
# Present menu to select tag
tag=$(timew tags | tail +4 | cut -d " " -f 1 | bemenu $@)
tag=$(echo "${tag%-*}" | xargs echo -n)
# Start timetracking
output=$(timew start "$tag")
# Send notification
notify-send -t 5000 "timew" "${output}"