summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-01-15 23:42:30 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-01-15 23:42:30 +0100
commitefcd2b7cdb03a354bd4311bac75953738ec34e4f (patch)
tree5227c1571ccbcbc869d33aba67179637e8542b11
parent12617b07249e209aa373b2c62b2f30cc644b0711 (diff)
checkpoint
-rwxr-xr-xbin/menuscripts/pomo8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/menuscripts/pomo b/bin/menuscripts/pomo
index ed64ce7..07db166 100755
--- a/bin/menuscripts/pomo
+++ b/bin/menuscripts/pomo
@@ -16,7 +16,7 @@ player_command() {
printf >&2 ' > '
[ -r "$ringSound" ] || PLAYER=""
case "$PLAYER" in
- mpv) mpv --loop --msg-level=all=no "$ringSound" ;;
+ mpv) mpv --volume=100 --loop --msg-level=all=no --resume-playback=no "$ringSound" 2>/dev/null;;
"") head -n 1 ;;
*) $PLAYER "$ringSound" ;;
esac
@@ -46,9 +46,11 @@ ring) ;;
esac
ringSound="${XDG_DATA_HOME:-$HOME/.local/share}"/pomo/ring.aac
-[ -r "$ringSound" ] && printf >&2 'ring: %s\n' "$ringSound"
+# For debugging purposes
if [ "$1" = "ring" ]; then
+ >&2 printf 'PLAYER: %s\n' "$PLAYER "
+ >&2 printf 'ringSound: %s\n' "$ringSound"
player_command
exit
fi
@@ -61,7 +63,7 @@ done
while true; do
notif "*START"
printf >&2 '%s S %s\n' "$(date '+%R')" "$round"
- sleep ${SLEEP_TIME}m
+ sleep "${SLEEP_TIME}m"
if [ "$round" -eq 3 ]; then
ring_ring 20 "*GIGA BREAK TIME"
round=0