-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpowermenu-settings.bash.default
More file actions
executable file
·48 lines (40 loc) · 1.65 KB
/
Copy pathpowermenu-settings.bash.default
File metadata and controls
executable file
·48 lines (40 loc) · 1.65 KB
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
43
44
45
46
47
48
### Commands
# These are pretty self explanatory, they are the commands that are run when you
# select an option in the menu. They can be added in a session to have a different
# command for a certain environment if you'd like
lockcmd="loginctl lock-session"
sleepcmd="systemctl suspend"
hibernatecmd="systemctl hibernate"
rebootcmd="systemctl reboot"
poweroffcmd="systemctl poweroff"
no="exit"
### Sessions
# Most are untested so please submit a pull or bug report if one doesn't work
case $currentwm in
bspwm ) exitcurrentwm="bspc quit" ;;
dwm ) exitcurrentwm="pkill dwm && pkill xinit" ;;
hyprland ) exitcurrentwm="hyprctl dispatch exit" ;;
i3 ) exitcurrentwm="i3-msg exit" ;;
openbox ) exitcurrentwm="openbox --exit" ;;
qtile ) exitcurrentwm="qtile cmd-obj -o cmd -f shutdown" ;;
sway ) exitcurrentwm="swaymsg exit" ;;
"kill literally everything dude" ) exitcurrentwm="loginctl kill-session $XDG_SESSION_ID" ;;
esac
### Runner
# The runner is the program that will display the menu and let you select the command
# Setting the runner can let you use terminal-based solutions as well, like bemenu
# with the ncurses option
# Make sure you keep the if statement to let you set the runner in the command line
# arguments
if [ -z "$runner" ]; then
case "$XDG_SESSION_TYPE" in
[Ww]"ayland" ) export runner="bemenu -i -c -l 7 -W.1 -p /" ;;
[Xx]"11" ) export runner="dmenu -l 7 -c" ;;
esac
fi
# If neither currentwm or xdg current are set, it will try to set using xdg session
if [ -z "$currentwm" ] && [ -z "$XDG_CURRENT_DESKTOP" ];then
currentwm="$XDG_SESSION_DESKTOP"
else
currentwm="$XDG_CURRENT_DESKTOP"
fi