Skip to content

Commit

Permalink
feat(just): update recipe to edit tuned default profile using ppd.conf (
Browse files Browse the repository at this point in the history
#907)

* feat(just): update recipe to change tuned default profile in ppd.conf

* chore(just): change wording on the powerprofile dialog
  • Loading branch information
HikariKnight committed Mar 24, 2024
1 parent b60b1e6 commit eed757d
Showing 1 changed file with 8 additions and 11 deletions.
Expand Up @@ -140,8 +140,13 @@ configure-powerprofile ACTION="":
echo " Use 'balanced' to select Balanced"
exit 0
elif [ "$OPTION" == "" ]; then
# Cleanup old method
if [ -f "~/.config/autostart/bazzite-powersave.desktop" ]; then
rm ~/.config/autostart/bazzite-powersave.desktop
fi
# New method from here on
echo "${bold}Power profile configuration${normal}"
echo "This lets you set the default power profile for when the desktop loads."
echo "This lets you set the default power profile."
echo "We do not recommend changing this from ${b}Balanced${n} if you use this device primarily for gaming!"
echo "If you have any performance or audio related issues..."
echo "${invert}${b}Please test with the default power profile set to Balanced${n} before reporting!"
Expand All @@ -151,19 +156,11 @@ configure-powerprofile ACTION="":
fi
if [[ "${OPTION,,}" =~ powersave ]]; then
echo "Setting default powerprofile to ${b}Powersave${n}"
bash -c 'cat << PPD > ~/.config/autostart/bazzite-powersave.desktop
[Desktop Entry]
Exec=/usr/bin/bazzite-powersave
Icon=dialog-scripts
Name=bazzite-powersave
Type=Application
PPD'
sudo sed -iE 's/default=(.+)/default=powersave/' /etc/tuned/ppd.conf
bazzite-powersave
elif [[ "${OPTION,,}" =~ balanced ]]; then
echo "Setting default powerprofile to ${b}Balanced${n}"
if [ -f "~/.config/autostart/bazzite-powersave.desktop" ]; then
rm ~/.config/autostart/bazzite-powersave.desktop
fi
sudo sed -iE 's/default=(.+)/default=balanced/' /etc/tuned/ppd.conf
bazzite-powersave 0
fi

Expand Down

0 comments on commit eed757d

Please sign in to comment.