diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 17:33:49 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 17:33:49 +0200 |
| commit | 4e25d94708b573631a13e9174dd1e8c4b13a3e35 (patch) | |
| tree | 07791fbcec441dfbac11c78fcc38533752e37778 | |
| parent | 5916a938348fe617dff61c415efcccd87a92d7e4 (diff) | |
| download | breaktimer-4e25d94708b573631a13e9174dd1e8c4b13a3e35.tar.gz breaktimer-4e25d94708b573631a13e9174dd1e8c4b13a3e35.zip | |
The config comment called a syntax error the loudest possible failure;
measured, it is reported on stderr but the script carries on with the
defaults, so point at breaktimer.sh config to confirm what took effect.
List config in the usage line, and include stopped in the state and phase
domain comments, which omitted it.
| -rwxr-xr-x | breaktimer.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/breaktimer.sh b/breaktimer.sh index 04dbaa9..bdc4129 100755 --- a/breaktimer.sh +++ b/breaktimer.sh @@ -23,7 +23,7 @@ # decrementato a ogni tick solo quando si lavora/conta. Cosi' la pausa manuale # congela davvero e il countdown Waybar e' sempre coerente. # -# Uso: breaktimer.sh start|stop|restart|pause|resume|toggle|status +# Uso: breaktimer.sh start|stop|restart|pause|resume|toggle|status|config # breaktimer.sh run (interno) # # Dipendenze: dunst (notify-send), pipewire (pw-play / paplay), coreutils. @@ -48,17 +48,18 @@ SYS_SOUND_BACK="$SOUND_DIR/service-login.oga" # ------------------------------------ # Overrides, if any. Bash sources files natively, so there is no format and no -# parser: a syntax error here is a bash error at start, on stderr, which is the -# loudest possible failure and the right one. Read once, here, which means a -# change needs `breaktimer.sh restart` to take effect. The `run` subcommand -# re-execs this script through setsid, so the daemon reads it too. +# parser: a syntax error is reported on stderr, but the script carries on with +# the defaults, so run `breaktimer.sh config` to confirm what took effect. +# Read once, here, which means a change needs `breaktimer.sh restart` to take +# effect. The `run` subcommand re-execs this script through setsid, so the +# daemon reads it too. CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/breaktimer.conf" [ -f "$CONFIG_FILE" ] && . "$CONFIG_FILE" RUNTIME="${XDG_RUNTIME_DIR:-/tmp}" PID_FILE="$RUNTIME/breaktimer.pid" -STATE_FILE="$RUNTIME/breaktimer.state" # running|paused -PHASE_FILE="$RUNTIME/breaktimer.phase" # working|breaking|longbreak +STATE_FILE="$RUNTIME/breaktimer.state" # running|paused|stopped +PHASE_FILE="$RUNTIME/breaktimer.phase" # working|breaking|longbreak|stopped REMAIN_FILE="$RUNTIME/breaktimer.remain" # secondi rimanenti della fase TICK=5 |
