aboutsummaryrefslogtreecommitdiff
path: root/plugins/display
blob: 7d8441c67b0836216803c8e4bb6ddb4a2ca890e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
[ "$1" = "info" ] && echo "plugin to display time nicely" && exit 2

. "$core_path/lib"
. "$core_path/update"

# on reset, print empty line to clear module
if [ $lap -eq 0 ] && [ $running -eq 0 ] && [ $time = $("$prog" lap 0) ] ; then
	echo ""
	exit
fi

# print time in square brackets if running, else between dashes
time="$(fmt_time $remaining)"
[ $running -eq 1 ] && echo "[$time]" \
                   || echo "-$time-"