25 lines
547 B
Bash
Executable file
25 lines
547 B
Bash
Executable file
#!/bin/bash
|
|
|
|
source "$HOME/.config/rofi/scripts/_lib.sh"
|
|
|
|
SCRIPTS_DIR="$HOME/.config/scripts"
|
|
|
|
declare -A scripts
|
|
scripts["Shutdown"]="systemctl poweroff"
|
|
scripts["Reboot"]="systemctl reboot"
|
|
scripts["Logout"]="logout terminate-user $USER"
|
|
scripts["Lock"]="$SCRIPTS_DIR/LockScreen.sh"
|
|
scripts["Notification Center (SwayNC)"]="swaync-client -t -sw"
|
|
|
|
setOption no-custom true
|
|
setOption use-hot-keys true
|
|
case $ROFI_RETV in
|
|
0)
|
|
printf "%s\n" "${!scripts[@]}"
|
|
;;
|
|
1)
|
|
command="${scripts[$@]}"
|
|
coproc ($command >/dev/null 2>&1)
|
|
exit 0
|
|
;;
|
|
esac
|