omarchy/install/first-run/battery-monitor.sh
2025-08-25 07:37:34 +02:00

13 lines
361 B
Bash
Executable File

#!/bin/bash
if ls /sys/class/power_supply/BAT* &>/dev/null; then
# This computer runs on a battery
powerprofilesctl set balanced || true
# Enable battery monitoring timer for low battery notifications
systemctl --user enable --now omarchy-battery-monitor.timer
else
# This computer runs on power outlet
powerprofilesctl set performance || true
fi