feat: autofreeze script for swww when window is selected + a toggle;
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;
This commit is contained in:
34
hypr/scripts/power_profile.sh
Executable file
34
hypr/scripts/power_profile.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user