More config cleanup
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
005c4f29b6
commit
8d3f9c8a1d
22 changed files with 44 additions and 27 deletions
41
system/.local/bin/power.sh
Executable file
41
system/.local/bin/power.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# power.sh
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Displays a power menu using zenity.
|
||||
#
|
||||
# USAGE:
|
||||
# ./power.sh
|
||||
|
||||
TEXT="Choose action"
|
||||
WIDTH=400
|
||||
HEIGHT=300
|
||||
ACTIONS=(
|
||||
"Reboot"
|
||||
"Shutdown"
|
||||
"Performance Mode"
|
||||
"Powersave Mode"
|
||||
)
|
||||
|
||||
action=$(zenity --list --width="${WIDTH}" --height="${HEIGHT}" --text="${TEXT}" --column="Action" "${ACTIONS[@]}")
|
||||
|
||||
echo "$action"
|
||||
if [ "${action}" == "Reboot" ]
|
||||
then
|
||||
systemctl reboot
|
||||
elif [ "${action}" == "Shutdown" ]
|
||||
then
|
||||
systemctl poweroff
|
||||
elif [ "${action}" == "Performance Mode" ]
|
||||
then
|
||||
gksudo "cpupower frequency-set -g performance"
|
||||
elif [ "${action}" == "Powersave Mode" ]
|
||||
then
|
||||
gksudo "cpupower frequency-set -g powersave"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue