aboutsummaryrefslogtreecommitdiff
path: root/gromo
diff options
context:
space:
mode:
Diffstat (limited to 'gromo')
-rwxr-xr-xgromo13
1 files changed, 9 insertions, 4 deletions
diff --git a/gromo b/gromo
index 73650f3..e14de26 100755
--- a/gromo
+++ b/gromo
@@ -46,13 +46,14 @@ if [ "$1" = "--xmobar-status" ]; then
elif [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
cmd=$(basename $0)
echo -e "Usage:
- $cmd --xmobar-status\tReturn state formatted for display in xmobar
- $cmd --help | -h \tShow this help
- $cmd [gromo] \tStart counting (default gromo: "work")
+ $cmd --xmobar-status \tReturn state formatted for display in xmobar
+ $cmd --help | -h \tShow this help
+ $cmd [gromo] [descr] \tStart counting gromo (default gromo: "work")
"
exit 0
elif [ "$#" -ge 1 ]; then
gromo="$1"
+ desc="$2"
else
gromo=work
fi
@@ -83,7 +84,11 @@ while true; do
echo -ne "\r\033[K[** IN PROGRESS: $gromo **] "
- echo "$gromo" > "$STATE_FILE"
+ if [ -n "$desc" ]; then
+ echo "$gromo ($desc)" > "$STATE_FILE"
+ else
+ echo "$gromo" > "$STATE_FILE"
+ fi
sleep $GROMO_SECONDS
echo idle > "$STATE_FILE"