scripts/launch_thyme

18 lines
328 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Thyme: track which applications you use and for how long
# https://github.com/sourcegraph/thyme
THYME_PATH="/usr/local/bin/thyme"
THYME_LOG="${HOME}/.thyme/$(date +%Y%m%d).json"
SCREEN_LOCKER="i3lock"
if [ "$(pidof "${SCREEN_LOCKER}")" ]; then
exit 0
else
"${THYME_PATH}" track -o "${THYME_LOG}"
fi
exit 0