diff --git a/modules/periodic.nix b/modules/periodic.nix index 19c52fb..c178a25 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -137,4 +137,15 @@ in startAt = "10:00:00"; after = [ "network-online.target" ]; }; + + # Show notification when the battery is low + systemd.user.services.swaynag-battery = { + description = "Show notification when the battery is low"; + path = [ + swaynag-battery + sway + ]; + script = "${pkgs.swaynag-battery}/bin/swaynag-battery --threshold 10"; + wantedBy = [ "sway-session.target" ]; + }; }