#!/usr/bin/env bash # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple power menu rofi script # - Dependencies: rofi, power-profiles-daemon ## OPTIONS ## option1=" Logout" option2=" Reboot" option3=" Power off" option4="鈴 Suspend" option5=" Lock" option6=" Cancel" ## OPTIONS ARRAY ## options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6" ## MAIN ACTION COMMAND ## action=$(echo -e "$options" | rofi -dmenu -p "  Power Options ") case "$action" in $option1*) pkill X;; $option2*) systemctl reboot || loginctl reboot;; $option3*) systemctl poweroff || loginctl poweroff;; $option4*) betterlockscreen --suspend;; $option5*) betterlockscreen -l;; $option6*) exit 0 esac