Rename scripts
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
df6b44e541
commit
410d0b33c6
46 changed files with 566 additions and 249 deletions
46
system/.local/bin/power
Executable file
46
system/.local/bin/power
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# power
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Displays a power menu using rofi.
|
||||
#
|
||||
# USAGE:
|
||||
# ./power
|
||||
|
||||
# The rofi prompt
|
||||
PROMPT="Power Options"
|
||||
|
||||
# Actions for the menu
|
||||
ACTIONS=(
|
||||
"1: Reboot"
|
||||
"2: Shutdown"
|
||||
"3: Lock Screen"
|
||||
"4: Performance Mode"
|
||||
"5: Powersave Mode"
|
||||
)
|
||||
|
||||
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
||||
case "${SELECTION}" in
|
||||
"1")
|
||||
systemctl reboot
|
||||
;;
|
||||
"2")
|
||||
systemctl poweroff
|
||||
;;
|
||||
"3")
|
||||
screenlock
|
||||
;;
|
||||
"4")
|
||||
gksudo "cpupower frequency-set -g performance"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=2' -c :8 > /dev/null
|
||||
;;
|
||||
"5")
|
||||
gksudo "cpupower frequency-set -g powersave"
|
||||
optirun -b primus nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=0' -c :8 > /dev/null
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue