changed waybar with backup

This commit is contained in:
2025-11-14 11:51:49 -08:00
parent 71d8044079
commit 03439b983e
76 changed files with 2520 additions and 6381 deletions

View File

@@ -1,30 +1,49 @@
#!/usr/bin/env bash
#
# Display a power menu to perform system actions
#
# Requirements:
# - fzf
#
# Author: Jesse Mirabel <sejjymvm@gmail.com>
# Created: August 19, 2025
# License: MIT
config="$HOME/.config/rofi/power-menu.rasi"
LIST=(
'Lock'
'Shutdown'
'Reboot'
'Logout'
'Hibernate'
'Suspend'
)
actions=$(echo -e " Lock\n Shutdown\n Reboot\n Suspend\n Hibernate\n󰞘 Logout")
main() {
# shellcheck disable=SC1090
. ~/.config/waybar/scripts/fzf-colors.sh 2> /dev/null
# Display logout menu
selected_option=$(echo -e "$actions" | rofi -dmenu -i -config "${config}" || pkill -x rofi)
local opts=(
--border=sharp
--border-label=' Power Menu '
--height=~100%
--highlight-line
--no-input
--pointer=
--reverse
"${COLORS[@]}"
)
# Perform actions based on the selected option
case "$selected_option" in
*Lock)
loginctl lock-session
;;
*Shutdown)
systemctl poweroff
;;
*Reboot)
systemctl reboot
;;
*Suspend)
systemctl suspend
;;
*Hibernate)
systemctl hibernate
;;
*Logout)
loginctl kill-session "$XDG_SESSION_ID"
;;
esac
local selected
selected=$(printf '%s\n' "${LIST[@]}" | fzf "${opts[@]}")
case $selected in
'Lock') loginctl lock-session ;;
'Shutdown') systemctl poweroff ;;
'Reboot') systemctl reboot ;;
'Logout') loginctl terminate-session "$XDG_SESSION_ID" ;;
'Hibernate') systemctl hibernate ;;
'Suspend') systemctl suspend ;;
esac
}
main