mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 20:29:24 +00:00
Tweak the menu options
This commit is contained in:
@ -5,18 +5,17 @@
|
|||||||
|
|
||||||
# Function to show power menu
|
# Function to show power menu
|
||||||
show_power_menu() {
|
show_power_menu() {
|
||||||
local menu_options=" Power Off
|
local menu_options=" Lock
|
||||||
Restart
|
|
||||||
Sleep
|
Sleep
|
||||||
Logout
|
Restart
|
||||||
Lock"
|
Shutdown"
|
||||||
|
|
||||||
# Show menu and get selection
|
# Show menu and get selection
|
||||||
local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 250)
|
local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 200 --height 250)
|
||||||
|
|
||||||
if [ -n "$selection" ]; then
|
if [ -n "$selection" ]; then
|
||||||
case "$selection" in
|
case "$selection" in
|
||||||
" Power Off")
|
" Shutdown")
|
||||||
systemctl poweroff
|
systemctl poweroff
|
||||||
;;
|
;;
|
||||||
" Restart")
|
" Restart")
|
||||||
@ -25,17 +24,13 @@ if [ -n "$selection" ]; then
|
|||||||
" Sleep")
|
" Sleep")
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
;;
|
;;
|
||||||
" Logout")
|
" Lock")
|
||||||
hyprctl dispatch exit
|
|
||||||
;;
|
|
||||||
" Lock")
|
|
||||||
hyprlock
|
hyprlock
|
||||||
;;
|
;;
|
||||||
*)
|
*) ;;
|
||||||
;;
|
esac
|
||||||
esac
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main execution
|
# Main execution
|
||||||
show_power_menu
|
show_power_menu
|
||||||
|
Reference in New Issue
Block a user