This is a collection of dotfiles and scripts for my bspwm setup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
492 B

#!/bin/sh
# Rofi prompt for system functions.
if [ "$WM" = "bspwm" ]; then
logout="bspc quit"
elif [ "$WM" = "i3" ]; then
logout="i3-msg exit"
fi
commands="\
Lock:$HOME/.local/bin/wm/lock.sh
Suspend:systemctl suspend
Shutdown:systemctl poweroff
Reboot:systemctl reboot
Logout:$logout"
choice=$(echo "$commands" | cut -d ':' -f 1 | rofi -no-fixed-num-lines -dmenu -i -p "System") || exit 0
exec=$(echo "$commands" | grep "^$choice" | cut -d ':' -f 2-)
eval "$exec"