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.template

26 lines
827 B
Plaintext
Raw Normal View History

#!/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 "{{.Data.terminal_background}}, {{.Data.terminal_foreground}}, {{.Data.terminal_background}}" \
-color-normal "{{.Data.terminal_background}}, {{.Data.terminal_foreground}}, {{.Data.terminal_background}}, {{index .Data.terminal_colors 4}}, {{.Data.terminal_background}}")
2017-12-02 01:06:11 -06:00
case $question in
*lock)
i3lock-fancy
;;
*logout)
session-logout
;;
*reboot)
systemctl reboot
;;
*shutdown)
systemctl poweroff
;;
*)
exit 0 # do nothing on wrong response
;;
esac