#!/bin/sh
CORE="suspend\nreboot\nhibernate\nshutdown\nkey repeat rate\nvolume mixer"
#EXTRA="display settings\nrgb off"

ACTION=$(printf "$CORE\n$EXTRA" | dmenu -c -i -l 10 -p "manager")

case "$ACTION" in
  "suspend")
    loginctl suspend;;
  "reboot")
    loginctl reboot;;
  "hibernate")
    loginctl hibernate;;
  "shutdown")
    loginctl poweroff;;
  "key repeat rate")
    xset r rate 200 40;;
  "volume mixer")
    st -i -g 80x20-200+200 -e pulsemixer;;
  "rgb off")
    openrgb --mode direct --color 000000;;
  "display settings")
    displayctl;;
esac
