This commit is contained in:
2026-03-23 22:37:27 -07:00
parent 19e7680316
commit 8c2da7fea7
7 changed files with 176 additions and 89 deletions

View File

@@ -5,48 +5,61 @@ source "$SCRIPT_DIR/rofi-menu-helpers.sh"
BROWSER=/usr/bin/zen-browser
DOC_GROUPS=(
"Arch Linux (btw)|ARCH"
"Hyprland|HYPRLAND"
"Arch Linux (btw)|ARCH"
"Hyprland|HYPRLAND"
"EVO|EVO80"
)
ARCH=(
"Archlinux Wiki|https://wiki.archlinux.org/title/Main_page"
"Archlinux Wiki|https://wiki.archlinux.org/title/Main_page"
)
HYPRLAND=(
"Hyprland Docs|https://wiki.hypr.land/"
"Hyprland Window Rules|https://wiki.hypr.land/Configuring/Window-Rules/"
"Hyprland Docs|https://wiki.hypr.land/"
"Hyprland Window Rules|https://wiki.hypr.land/Configuring/Window-Rules/"
)
EVO80=(
"Reference|feh $HOME/Documents/screenshots/reference/evo80/EVO80-Wireless-Keyboard-Reference.webp"
"Backlight|feh $HOME/Documents/screenshots/reference/evo80/EVO80-Wireless-Keyboard-Backlight-LED.webp"
"Modes|feh $HOME/Documents/screenshots/reference/evo80/EVO80-Wireless-Keyboard-Modes.webp"
)
select_group() {
rofi_select_label_value "Select Documentation Group" DOC_GROUPS
rofi_select_label_value "Select Documentation Group" DOC_GROUPS
}
select_url() {
local urls_array="$1"
rofi_select_label_value "Select Documentation" "$urls_array" "Back"
local urls_array="$1"
rofi_select_label_value "Select Documentation" "$urls_array" "Back"
}
main() {
while true; do
group_key="$(select_group)" || exit 0
case "$group_key" in
ARCH)
urls_ref=ARCH
;;
HYPRLAND)
urls_ref=HYPRLAND
;;
*)
exit 0
;;
esac
while true; do
group_key="$(select_group)" || exit 0
case "$group_key" in
ARCH)
urls_ref=ARCH
;;
HYPRLAND)
urls_ref=HYPRLAND
;;
EVO80)
urls_ref=EVO80
;;
*)
exit 0
;;
esac
selection="$(select_url "$urls_ref")" || exit 0
if [[ "$selection" == "Back" ]]; then
continue
fi
$BROWSER "$selection" &>/dev/null &
exit 0
done
selection="$(select_url "$urls_ref")" || exit 0
if [[ "$selection" == "Back" ]]; then
continue
fi
if [[ "$selection" == feh* ]]; then
bash -c "$selection" &> /dev/null &
exit $?
fi
$BROWSER "$selection" &> /dev/null &
exit 0
done
}
main