This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/bin/rofi-logout

26 lines
647 B
Bash
Executable File

#!/usr/bin/env bash
question=$(echo " lock| logout| reboot| shutdown" | rofi -sep "|" \
-dmenu -i -p 'System: ' "" -width 20 -hide-scrollbar -font "Ubuntu 11" \
-eh 1 -line-padding 4 -padding 20 -no-config -lines 4 -color-enabled \
-color-window "#2b303b, #8fa1b3, #2b303b" \
-color-normal "#2b303b, #8fa1b3, #2b303b, #8fa1b3, #2b303b")
case $question in
*lock)
i3lock-fancy
;;
*logout)
session-logout
;;
*reboot)
systemctl reboot
;;
*shutdown)
systemctl poweroff
;;
*)
exit 0 # do nothing on wrong response
;;
esac