From 483ca41894a886e39bc713e93eb12054be83d582 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 24 Jun 2025 08:48:33 -0700 Subject: [PATCH] Ensure we are running at maximum power on a desktop machine --- install/desktop.sh | 2 +- install/power.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 install/power.sh diff --git a/install/desktop.sh b/install/desktop.sh index 3a82248..ff80426 100644 --- a/install/desktop.sh +++ b/install/desktop.sh @@ -1,5 +1,5 @@ yay -S --noconfirm --needed \ - brightnessctl playerctl wpctl pamixer pavucontrol wireplumber power-profiles-daemon blueberry \ + brightnessctl playerctl wpctl pamixer pavucontrol wireplumber blueberry \ fcitx5 fcitx5-gtk fcitx5-qt fcitx5-configtool \ wl-clip-persist clipse \ nautilus sushi gnome-calculator \ diff --git a/install/power.sh b/install/power.sh new file mode 100644 index 0000000..8adb17d --- /dev/null +++ b/install/power.sh @@ -0,0 +1,8 @@ +yay -S --noconfirm power-profiles-daemon + +if ls /sys/class/power_supply/BAT* &>/dev/null; then + # This computer runs on a battery, leave powerprofile at Balanced +else + # Always use maximum power when using a desktop machine + powerprofilesctl set performance +fi