refactor: cpufreq does not save notifications anymore; feat: 3GHz option for cpufreq; feat: Script for controlling power profile + bind; refactor: removed hyprpaper, replaced with swww; refactor: no longer affecting border radius in gamemode; fix: grayscale filter; feat: toggle automatic wallpaper switching;
35 lines
854 B
Bash
Executable File
35 lines
854 B
Bash
Executable File
#!/bin/bash
|
|
|
|
notify-send --hint int:transient:1 -t 500 "powerprofilesctl" "Please, wait..."
|
|
CURRENT=$(powerprofilesctl get)
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
notify-send --hint int:transient:1 -t 1800 "powerprofilesctl" "Error: could not retrieve status"
|
|
exit 1
|
|
fi
|
|
|
|
case "$CURRENT" in
|
|
"power-saver")
|
|
powerprofilesctl set balanced
|
|
;;
|
|
"balanced")
|
|
powerprofilesctl set performance
|
|
;;
|
|
"performance")
|
|
powerprofilesctl set power-saver
|
|
;;
|
|
*)
|
|
echo "Error: '$CURRENT' is not a valid power mode"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
notify-send --hint int:transient:1 -t 800 "powerprofilesctl" "Error: failed to set power mode"
|
|
exit 1
|
|
else
|
|
notify-send --hint int:transient:1 -t 800 "powerprofilesctl" "Successfully changed to $(powerprofilesctl get)"
|
|
fi
|
|
|
|
exit 0
|