#!/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-"