#!/usr/bin/env bash # to edit themes in place with live reload: # ag -l | entr -r $HOME/.config/rofi/on # use -normal-window flag on rofi if you want to not have to close rofi to get # back to your editor. # https://www.reddit.com/r/qtools/comments/amswu9/autoloading_rofi_for_quick_themeing_experience/ options="  lock  logout  sleep  hibernate  reboot  shutdown" themes_dir=$HOME/.config/rofi theme=${1:-$themes_dir/colors-rofi-dark.rasi} selection=$(echo -e "${options}" | rofi -dmenu -config ~/.config/rofi/config $theme -columns 6 -lines 1 -width 1700) echo "This is your selection: $selection" case "${selection}" in "  lock") betterlockscreen -l dim;; "  logout") i3-msg exit;; "  sleep") systemctl suspend;; "  hibernate") systemctl hibernate;; "  reboot") systemctl reboot;; "  shutdown") systemctl poweroff -i;; esac exit 0