diff options
author | Guillermo Ramos | 2021-08-24 10:05:23 +0200 |
---|---|---|
committer | Guillermo Ramos | 2021-08-24 10:05:23 +0200 |
commit | 12119fa837d422f55acdc904d2fbbb3bf88d527f (patch) | |
tree | 6bcdb6c601913f2575eddf90b21c9fe783628554 /gromo | |
parent | 171edfad8a26d3494b5cfc3293f49214d899a54f (diff) | |
download | cli-12119fa837d422f55acdc904d2fbbb3bf88d527f.tar.gz |
gromo: descriptions
Diffstat (limited to 'gromo')
-rwxr-xr-x | gromo | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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" |