mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-29 22:20:21 +00:00
fix(bazzite-powersave): make arg to set PPD to balance work (#1252)
the default is to enable power-saver mode when run and that always worked and was the point of the script, which is why this never got caught before now.
This commit is contained in:
parent
5a78d7a88e
commit
1c2148bde6
@ -2,8 +2,8 @@
|
||||
# This script sends the Power Profile Daemon dbus call to set tuneD to power-saver mode
|
||||
# This is useful only for battery powered devices where you want to start in power-saver mode by default
|
||||
POWERSAVE=1
|
||||
if [ -z "$1" ]; then
|
||||
if [ "$1" == 0 ]; then
|
||||
if [ -n "$1" ]; then
|
||||
if [ "$1" == "0" ]; then
|
||||
POWERSAVE=0
|
||||
fi
|
||||
fi
|
||||
@ -11,14 +11,14 @@ fi
|
||||
# Check what DE we are on
|
||||
if command -v /usr/bin/mutter > /dev/null; then
|
||||
# If we are on Gnome send the dbus signal with gdbus
|
||||
if [ $POWERSAVE == 0 ]; then
|
||||
if [ "$POWERSAVE" == "0" ]; then
|
||||
gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'balanced'>"
|
||||
else
|
||||
gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'power-saver'>"
|
||||
fi
|
||||
else
|
||||
# Assume we are on KDE and send the dbus signal with qdbus
|
||||
if [ $POWERSAVE == 0 ]; then
|
||||
if [ "$POWERSAVE" == "0" ]; then
|
||||
qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/PowerProfile setProfile balanced
|
||||
else
|
||||
qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/PowerProfile setProfile power-saver
|
||||
|
Loading…
x
Reference in New Issue
Block a user