Deletged generated, testing new location scripts
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||
#
|
||||
# Launch a power menu
|
||||
#
|
||||
# Requires fzf and systemd (loginctl, systemctl)
|
||||
#
|
||||
# Author: Jesse Mirabel <sejjymvm@gmail.com>
|
||||
# Date: August 19, 2025
|
||||
# License: MIT
|
||||
|
||||
main() {
|
||||
local list=(
|
||||
" Lock"
|
||||
" Shutdown"
|
||||
" Reboot"
|
||||
" Logout"
|
||||
" Hibernate"
|
||||
" Suspend"
|
||||
)
|
||||
|
||||
local options=(
|
||||
"--border=sharp"
|
||||
"--border-label= Power Menu "
|
||||
"--cycle"
|
||||
"--ghost=Search"
|
||||
"--height=~100%"
|
||||
"--highlight-line"
|
||||
"--info=inline-right"
|
||||
"--pointer="
|
||||
"--reverse"
|
||||
)
|
||||
|
||||
local selected
|
||||
selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
|
||||
|
||||
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 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
||||
Reference in New Issue
Block a user