aboutsummaryrefslogtreecommitdiff
path: root/core/toggle
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-03-11 18:33:02 +0100
committerlonkaars <loek@pipeframe.xyz>2024-03-11 18:33:02 +0100
commite6c1cacb60010ec75e02cf72acf34278417670fd (patch)
tree97e8f8042f4d8461e7cec9f403787bad20ffde9e /core/toggle
initial commit (basic functionality)
Diffstat (limited to 'core/toggle')
-rwxr-xr-xcore/toggle7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/toggle b/core/toggle
new file mode 100755
index 0000000..bfb96d2
--- /dev/null
+++ b/core/toggle
@@ -0,0 +1,7 @@
+#!/bin/sh
+[ "$1" = "info" ] && echo "toggle the timer between running and paused" && exit 2
+
+. "$core_path/update"
+
+[ "$state" = 'running' ] && exec "$prog" pause || exec "$prog" start
+