#!/bin/bash dmenu="dmenu -p exit" choice=$(echo -e "shutdown\nrestart\nlogoff\nscreenlock" | $dmenu) case $choice in shutdown) sudo halt ;; restart) sudo shutdown -r now ;; logoff) herbstclient quit ;; screenlock) i3lock -c 000000 ;; esac