From 99119c2941096f36360507972efc7136c1f32d2d Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 25 Apr 2024 21:02:49 -0400 Subject: [PATCH] petalburg: improve pp-adjuster reproducibility --- hosts/petalburg/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index 74c1c4c4..932ec9f9 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -37,18 +37,19 @@ runtimeInputs = [pkgs.libnotify pkgs.power-profiles-daemon]; text = '' - current_profile=$(powerprofilesctl get | tr -d '[:space:]') + # Only works on petalburg. + current_profile=$(${pkgs.power-profiles-daemon}/bin/powerprofilesctl get | tr -d '[:space:]') if [ "$current_profile" == "power-saver" ]; then - powerprofilesctl set balanced + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set balanced elif [ "$current_profile" == "balanced" ]; then - powerprofilesctl set performance + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set performance elif [ "$current_profile" == "performance" ]; then - powerprofilesctl set power-saver + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver fi - new_profile=$(powerprofilesctl get | tr -d '[:space:]') - notify-send "Power profile set to $new_profile." + new_profile=$(${pkgs.power-profiles-daemon}/bin/powerprofilesctl get | tr -d '[:space:]') + ${pkgs.libnotify}/bin/notify-send "Power profile set to $new_profile." ''; }; in {