f*** power-profiles-daemon
This commit is contained in:
parent
0e5937d2f5
commit
c534d1196b
1 changed files with 2 additions and 32 deletions
|
@ -10,20 +10,10 @@ option2=" Reboot"
|
||||||
option3=" Power off"
|
option3=" Power off"
|
||||||
option4="鈴 Suspend"
|
option4="鈴 Suspend"
|
||||||
option5=" Lock"
|
option5=" Lock"
|
||||||
option6=" Change power profile"
|
option6=" Cancel"
|
||||||
option7=" Cancel"
|
|
||||||
|
|
||||||
## OPTIONS ARRAY ##
|
## OPTIONS ARRAY ##
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||||
|
|
||||||
## POWER PROFILE OPTIONS ##
|
|
||||||
pwr1=" Performance"
|
|
||||||
pwr2=" Balanced"
|
|
||||||
pwr3=" Power Saver"
|
|
||||||
pwr4=" Cancel"
|
|
||||||
|
|
||||||
## POWER PROFILES ARRAY ##
|
|
||||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
|
||||||
|
|
||||||
## MAIN ACTION COMMAND ##
|
## MAIN ACTION COMMAND ##
|
||||||
action=$(echo -e "$options" | rofi -dmenu -p " Power Options ")
|
action=$(echo -e "$options" | rofi -dmenu -p " Power Options ")
|
||||||
|
@ -39,25 +29,5 @@ case "$action" in
|
||||||
$option5*)
|
$option5*)
|
||||||
betterlockscreen -l;;
|
betterlockscreen -l;;
|
||||||
$option6*)
|
$option6*)
|
||||||
currentpwr=$(powerprofilesctl get)
|
|
||||||
if [ "$currentpwr" = "performance" ]; then
|
|
||||||
currentpwr=" Performance"
|
|
||||||
elif [ "$currentpwr" = "power-saver" ]; then
|
|
||||||
currentpwr=" Power Saver"
|
|
||||||
elif [ "$currentpwr" = "balanced" ]; then
|
|
||||||
currentpwr=" Balanced"
|
|
||||||
fi
|
|
||||||
pwraction=$(echo -e "$pwrs" | rofi -dmenu -p " Power Profile Menu - Currently set to: ${currentpwr} ")
|
|
||||||
case "$pwraction" in
|
|
||||||
$pwr1*)
|
|
||||||
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
|
||||||
$pwr2*)
|
|
||||||
powerprofilesctl set balanced && notify-send "Power profile switched to balanced";;
|
|
||||||
$pwr3*)
|
|
||||||
powerprofilesctl set power-saver && notify-send "Power profile switched to power saver";;
|
|
||||||
$pwr4*)
|
|
||||||
exit 0
|
|
||||||
esac;;
|
|
||||||
$option7*)
|
|
||||||
exit 0
|
exit 0
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue