16 lines
361 B
Bash
Executable File
16 lines
361 B
Bash
Executable File
#!/usr/bin/env bash
|
|
case "$1" in
|
|
status)
|
|
powerprofilesctl get | grep -q power-saver && echo true || echo false
|
|
;;
|
|
*)
|
|
if powerprofilesctl get | grep -q power-saver; then
|
|
powerprofilesctl set balanced 2>/dev/null || true
|
|
echo false
|
|
else
|
|
powerprofilesctl set power-saver 2>/dev/null || true
|
|
echo true
|
|
fi
|
|
;;
|
|
esac
|