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.
|
|
|
|
#!/usr/bin/sh
|
|
|
|
|
if type -p rofi 2> /dev/null; then
|
|
|
|
|
selectcommand="rofi -dmenu -i -theme themes/five.rasi"
|
|
|
|
|
shutdown=""
|
|
|
|
|
reboot=""
|
|
|
|
|
lock=""
|
|
|
|
|
suspend=""
|
|
|
|
|
logout=""
|
|
|
|
|
else
|
|
|
|
|
selectcommand="dmenu -i -p 'Option'"
|
|
|
|
|
shutdown="Shutdown"
|
|
|
|
|
reboot="Reboot"
|
|
|
|
|
lock="Lock"
|
|
|
|
|
suspend="Suspend"
|
|
|
|
|
logout="Logout"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selection=$( \
|
|
|
|
|
#echo -e "$shutdown\n$reboot\n$lock\n$suspend\n$logout" | $selectcommand
|
|
|
|
|
echo -e "$shutdown\n$reboot\n$lock\n$suspend" | $selectcommand
|
|
|
|
|
);
|
|
|
|
|
echo $selection;
|
|
|
|
|
|
|
|
|
|
sleep .2
|
|
|
|
|
|
|
|
|
|
case $selection in
|
|
|
|
|
)
|
|
|
|
|
i3exit lock
|
|
|
|
|
;;
|
|
|
|
|
Logout)
|
|
|
|
|
i3exit logout
|
|
|
|
|
;;
|
|
|
|
|
Suspend)
|
|
|
|
|
i3exit suspend
|
|
|
|
|
;;
|
|
|
|
|
Hibernate)
|
|
|
|
|
i3exit hibernate
|
|
|
|
|
;;
|
|
|
|
|
Reboot)
|
|
|
|
|
i3exit reboot
|
|
|
|
|
;;
|
|
|
|
|
Shutdown)
|
|
|
|
|
i3exit shutdown
|
|
|
|
|
;;
|
|
|
|
|
esac
|