# ABOUTME: Restores battery charge threshold from saved state on boot. # ABOUTME: Only runs on laptops with threshold support and a saved state file. [Unit] Description=Restore battery conservation mode threshold After=sysinit.target ConditionPathExists=/sys/class/power_supply/BAT0/charge_control_end_threshold ConditionPathExists=/var/lib/moonarch/batsaver-threshold [Service] Type=oneshot ExecStart=/usr/bin/moonarch-batsaver-restore NoNewPrivileges=true ProtectHome=true PrivateTmp=true ProtectKernelModules=true ProtectControlGroups=true RestrictNamespaces=true RestrictRealtime=true LockPersonality=true [Install] WantedBy=multi-user.target