♻️ hypr: separate and organize scripts

This commit is contained in:
retrozinndev
2025-02-12 13:41:56 -03:00
parent be2731516e
commit 58b876c6e8
9 changed files with 59 additions and 89 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Checks environment for dmenu or dmenu-like apps
# and prints out a command to pipe of.
# -----------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From: https://github.com/retrozinndev/Hyprland-Dots
DMENUS=(
"anyrun:--plugins:libstdin.so"
"rofi:-dmenu"
"wofi:--show:dmenu"
"dmenu"
)
for dmenu in ${DMENUS[@]}; do
name=$(printf "$dmenu" | awk -F: '{ print $1 }')
cmd=$(env "$name" -h > /dev/null)
code=$?
if [[ ! $code == 127 ]]; then
echo "$dmenu" | sed 's/:/ /g'
break;
fi
done