diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-10-22 15:55:57 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-10-22 15:55:57 +0900 |
| commit | c222e1bad2ba5e779c3af5b956906c82ead43271 (patch) | |
| tree | a5253e0861c200ff90354169e1f67ef42ebf0ef9 /config/hypr/scripts/WofiPower.sh | |
| parent | bb0be21dba7980fc1c047eaba24eda1712bd7f31 (diff) | |
Initial upload
Diffstat (limited to 'config/hypr/scripts/WofiPower.sh')
| -rwxr-xr-x | config/hypr/scripts/WofiPower.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/config/hypr/scripts/WofiPower.sh b/config/hypr/scripts/WofiPower.sh new file mode 100755 index 00000000..74f5f105 --- /dev/null +++ b/config/hypr/scripts/WofiPower.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# WOFI STYLES +CONFIG="$HOME/.config/wofi/WofiBig/config" +STYLE="$HOME/.config/wofi/style.css" +COLORS="$HOME/.config/wofi/colors" + +# Wofi window config (in %) +WOFI_WIDTH=28 +WOFI_HEIGHT=8 + +wofi_command="wofi --show dmenu \ + --prompt choose... \ + --conf $CONFIG --style $STYLE --color $COLORS \ + --width=$WOFI_WIDTH% --height=$WOFI_HEIGHT% \ + --cache-file=/dev/null \ + --hide-scroll --no-actions \ + --matching=fuzzy" + +entries=$(echo -e " Poweroff\n Reboot\n Suspend\n Lock\n Logout" | $wofi_command -i --dmenu | awk '{print tolower($2)}') + +case $entries in + poweroff|reboot|suspend) + systemctl $entries + ;; + lock) + $HOME/.config/hypr/scripts/LockScreen.sh + ;; + logout) + hyprctl dispatch exit 0 + ;; +esac +
\ No newline at end of file |
