mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add omarchy-doctor checks
This commit is contained in:
13
install/checks/power-profiles.sh
Normal file
13
install/checks/power-profiles.sh
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user