mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 14:31:54 -05:00
petalburg: improve pp-adjuster reproducibility
This commit is contained in:
parent
1d6fc10067
commit
99119c2941
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue