Dotfiles/home/scripts/.local/scripts/toggl-current

14 lines
326 B
Bash
Executable File

#!/bin/sh
#your toggl api token
TOGGL_API_TOKEN=7b42e9971bd0e27f68f9270a446ed7d2
res=$(curl -u $TOGGL_API_TOKEN:api_token \
-X GET https://api.track.toggl.com/api/v8/time_entries/current)
echo $res
# desc=$(echo $res | jq -r '.data .description')
# dur=$(echo $res | jq -r '.data .duration')
#
# echo $desc
# echo $dur