diff --git a/c/timer.c b/c/timer.c index b6ff204..2ab5ebc 100644 --- a/c/timer.c +++ b/c/timer.c @@ -92,6 +92,12 @@ char *timerdisp(struct timer *t) { return str; } +void defaultSettings(struct settings s) { + s.e = 1; + s.b = 1; + s.f = 1; +} + void timerloop() { struct timer *t = timerinit(); if(s.d) { @@ -146,7 +152,7 @@ void timerloop() { int main(int argc, char **argv) { char c; - while((c = getopt(argc, argv, "evdbftph:m:s:")) != -1) { + while((c = getopt(argc, argv, "evdbftpzh:m:s:")) != -1) { switch(c) { break; case 'e': s.e = 1; break; case 'v': s.v = 1; @@ -155,6 +161,7 @@ int main(int argc, char **argv) { break; case 'f': s.f = 1; break; case 't': s.t = 1; break; case 'p': s.p = 1; + break; case 'z': s.e = 1; s.b = 1; s.f = 1; break; case 'h': s.s = s.s + (atoi(optarg) * 3600); break; case 'm': s.s = s.s + (atoi(optarg) * 60); break; case 's': s.s = s.s + atoi(optarg); diff --git a/man/timer.1 b/man/timer.1 index f24e6be..e06fcf4 100644 --- a/man/timer.1 +++ b/man/timer.1 @@ -26,6 +26,9 @@ use a tomato timer (use -h, -m, -s to set work cycle time, rest cycle time is as .B -p disable pausing after finishing tomato timer cycle (required -t to work) .TP +.B -z +enable build-specific runtime settings (default -ebf) +.TP .B "-h int" specify number of hours for timer parameters .TP