summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh3
-rw-r--r--reminder/reminder/exercise.scm6
-rw-r--r--shepherd/shepherd/init.d/exercise.scm17
-rw-r--r--uninstall.sh3
4 files changed, 29 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index b81416a..2730232 100755
--- a/install.sh
+++ b/install.sh
@@ -38,3 +38,6 @@ stow -Rt $XDG_CONFIG_HOME newsboat
# Sioyek
stow -Rt $XDG_CONFIG_HOME sioyek
+
+# Reminder
+stow -Rt $XDG_CONFIG_HOME reminder
diff --git a/reminder/reminder/exercise.scm b/reminder/reminder/exercise.scm
new file mode 100644
index 0000000..e034a8c
--- /dev/null
+++ b/reminder/reminder/exercise.scm
@@ -0,0 +1,6 @@
+((period 45) ;; In minutes, how much time to period between notifications
+ (title "Crush it!") ;; Notification title (optional)
+ (messages ("Squats x 20" ;; Some text with each message to show
+ "Push-ups x 15" ;; Accepts simple markup like <i> <b>
+ "Pull-ups x 6"
+ "Kettlebell swings x 30")))
diff --git a/shepherd/shepherd/init.d/exercise.scm b/shepherd/shepherd/init.d/exercise.scm
new file mode 100644
index 0000000..c00b879
--- /dev/null
+++ b/shepherd/shepherd/init.d/exercise.scm
@@ -0,0 +1,17 @@
+(define config (or (getenv "XDG_CONFIG_HOME")
+ (string-append (getenv "HOME") "/.config")))
+
+(define exercise
+ (service
+ '(exercise)
+ #:documentation "When you are in the computer, you should pause and do some
+exercise. Dude, come on"
+ #:start (make-forkexec-constructor
+ `("guile" "-e" "(reminder)" "--" "-c"
+ ,(string-append config "/reminder/exercise.scm"))
+ #:log-file (string-append config "/reminder/exercise.log"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t))
+(register-services exercise)
+
+(start exercise)
diff --git a/uninstall.sh b/uninstall.sh
index 02f0a5b..448b49f 100644
--- a/uninstall.sh
+++ b/uninstall.sh
@@ -35,3 +35,6 @@ stow -Dt ${XDG_CONFIG_HOME:=$HOME/.config} newsboat
# sioyek
stow -Dt ${XDG_CONFIG_HOME:=$HOME/.config} sioyek
+
+# Exercise reminder
+stow -Dt ${XDG_CONFIG_HOME:=$HOME/.config} reminder