diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-07 12:46:42 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-07 12:46:42 +0800 |
| commit | 52af58e39af8ac006c62d1788b6672966b2a9f47 (patch) | |
| tree | a07e147eb4d3c2af1e3da5e5fc32ca1f04e9e5b0 /bin/unix | |
| parent | 204f6a6a7024a2744fe948b1014494ebc2fd3a56 (diff) | |
Update
Diffstat (limited to 'bin/unix')
| -rwxr-xr-x | bin/unix/timer.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/unix/timer.sh b/bin/unix/timer.sh index b4f48c5..b7f941e 100755 --- a/bin/unix/timer.sh +++ b/bin/unix/timer.sh | |||
| @@ -8,6 +8,8 @@ SIGNAL=${1:-SIGTERM} | |||
| 8 | COMMAND_START="$2" | 8 | COMMAND_START="$2" |
| 9 | COMMAND_EXIT="$3" | 9 | COMMAND_EXIT="$3" |
| 10 | 10 | ||
| 11 | [ -n "$COLOR" ] && echo -en "\e[${COLOR}m" | ||
| 12 | |||
| 11 | # If SIGNAL is received, switch to next display | 13 | # If SIGNAL is received, switch to next display |
| 12 | trap 'next_display' "$SIGNAL" | 14 | trap 'next_display' "$SIGNAL" |
| 13 | # Use SIGTSTP (Ctrl-Z in most of the cases) to stop/restart timer | 15 | # Use SIGTSTP (Ctrl-Z in most of the cases) to stop/restart timer |