diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-12-21 18:57:29 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-12-21 18:57:29 +0100 |
commit | ccca62e11f0d1ddd8838fb927c09d72dcb53e514 (patch) | |
tree | f77f5483075d135058a317c032deae0cd23e18eb | |
parent | 26a555aab2100297581888f58cdf6545b82634f1 (diff) |
exercise-reminder: add itguix
-rwxr-xr-x | install.sh | 3 | ||||
-rw-r--r-- | reminder/reminder/exercise.scm | 6 | ||||
-rw-r--r-- | shepherd/shepherd/init.d/exercise.scm | 17 | ||||
-rw-r--r-- | uninstall.sh | 3 |
4 files changed, 29 insertions, 0 deletions
@@ -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 |