Add omarchy-doctor checks

This commit is contained in:
Ryan Hughes
2025-09-28 00:45:37 -04:00
parent 57a977a51d
commit 9dcc6f0aec
14 changed files with 321 additions and 165 deletions

View File

@@ -0,0 +1,13 @@
OMARCHY_DESCRIPTION="Power Profile & Battery Settings"
omarchy_verify() {
if ls /sys/class/power_supply/BAT* &>/dev/null; then
current_profile=$(powerprofilesctl get 2>/dev/null)
[[ "$current_profile" == "balanced" ]] || add_error "Power profile not set to balanced for battery device"
systemctl --user is-enabled omarchy-battery-monitor.timer &>/dev/null || add_error "Battery monitor timer not enabled"
else
current_profile=$(powerprofilesctl get 2>/dev/null)
[[ "$current_profile" == "performance" ]] || add_error "Power profile not set to performance for AC device"
fi
}