From c222e1bad2ba5e779c3af5b956906c82ead43271 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 22 Oct 2023 15:55:57 +0900 Subject: Initial upload --- config/hypr/scripts/WofiPower.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 config/hypr/scripts/WofiPower.sh (limited to 'config/hypr/scripts/WofiPower.sh') 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 -- cgit v1.2.3