#!/bin/sh -e case $1 in quit) exit 0 ;; 'Reload i3 configuration') i3-msg reload >&2 ;; 'Log out') i3-msg exit >&2 ;; 'Shutdown') sudo -n /run/current-system/profile/sbin/shutdown >&2 ;; 'Reboot') sudo -n /run/current-system/profile/sbin/reboot >&2 ;; *) printf '\0%s\x1f%s\n' prompt 'Session' printf '%s\0icon\x1f%s\n' \ 'Reload i3 configuration' reload \ 'Log out' system-log-out \ 'Shutdown' system-shutdown \ 'Reboot' system-reboot ;; esac