#!/bin/bash # # a simple dmenu session script # ### DMENU='dmenu' choice=$(echo -e "logout\nsuspend\nhibernate\nshutdown\nreboot" | $DMENU) case "$choice" in logout) kill -9 -1 & ;; suspend) systemctl suspend & ;; hibernate) systemctl hibernate & ;; shutdown) systemctl poweroff & ;; reboot) systemctl reboot & ;; esac