-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwlogout
More file actions
42 lines (36 loc) · 951 Bytes
/
wlogout
File metadata and controls
42 lines (36 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# ***This script was made by Clay Gomera (Drake)***
# - Description: A simple power menu rofi script
# - Dependencies: rofi, power-profiles-daemon
## OPTIONS ##
option1=" Logout"
option2=" Reboot"
option3=" Power off"
option4=" Suspend"
option5=" Lock"
option6=" Cancel"
## OPTIONS ARRAY ##
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 ##
action=$(echo -e "$options" | tofi --prompt-text "")
case "$action" in
$option1*)
kill -9 -1;;
$option2*)
systemctl reboot || loginctl reboot;;
$option3*)
systemctl poweroff || loginctl poweroff;;
$option4*)
systemctl suspend;;
$option5*)
hyprlock;;
$option6*)
exit 0
esac