health-reminder++

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-12-02 21:04:41 +01:00
parent c6ca7c95f4
commit 79cbdc9f69

View File

@@ -1,7 +1,7 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{
systemd.user.timers."health_reminder" = {
systemd.timers."health_reminder" = {
enable = true;
wantedBy = [ "timers.target" ];
timerConfig = {
@@ -11,7 +11,7 @@ lib.mkIf (host != "NxACE")
};
};
systemd.user.services."health_reminder" = let
systemd.services."health_reminder" = let
hm = pkgs.writers.writePython3Bin "health_reminder" {
flakeIgnore = [ "E302" "E305" "E226" "E501" ];
} /*python*/ ''
@@ -34,14 +34,14 @@ lib.mkIf (host != "NxACE")
return action
actions = [
Action(action="look away for %o Seconds!", likelyhood=300, options=["10", "15"]),
Action(action="Posture Check!", likelyhood=300),
Action(action="Strech your upper body!", likelyhood=20),
Action(action="Strech your core!", likelyhood=10),
Action(action="Strech your legs!", likelyhood=10),
Action(action="Strech your arms/hands!", likelyhood=10),
Action(action="Make Tea!", likelyhood=5),
Action(action="", likelyhood=2),
Action(action="look away for %o Seconds!", likelihood=300, options=["10", "15"]),
Action(action="Posture Check!", likelihood=300),
Action(action="Strech your upper body!", likelihood=20),
Action(action="Strech your core!", likelihood=10),
Action(action="Strech your legs!", likelihood=10),
Action(action="Strech your arms/hands!", likelihood=10),
Action(action="Make Tea!", likelihood=5),
Action(action="", likelihood=2),
]
total_likelihood = sum(a.likelihood for a in actions)