Shigeto Kumagai bc43377cc6
fix: add python-object to make installation of Omarchy work (#806)
* Explicitly add python-object to make powerprofile work

* added migration

* Explain the why, not the how

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-08-18 16:13:21 +02:00

17 lines
639 B
Bash

#!/bin/bash
# Setting the performance profile can make a big difference. By default, most systems seem to start in balanced mode,
# even if they're not running off a battery. So let's make sure that's changed to performance.
yay -S --noconfirm python-gobject power-profiles-daemon
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 || true
else
# This computer runs on power outlet
powerprofilesctl set performance || true
fi