mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
21 lines
682 B
Bash
Executable File
21 lines
682 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
BROWSER=/usr/bin/zen-browser
|
|
URLS=(
|
|
"Archlinux Wiki|https://wiki.archlinux.org/title/Main_page"
|
|
"Hyprland Docs|https://wiki.hypr.land/"
|
|
"Hyprland Window Rules|https://wiki.hypr.land/Configuring/Window-Rules/"
|
|
)
|
|
|
|
DISPLAY_URLS=()
|
|
declare -A URL_MAP
|
|
for url in "${URLS[@]}"; do
|
|
DISPLAY_URLS+=("${url%%|*}")
|
|
label="${url%%|*}"
|
|
URL_MAP["$label"]="${url##*|}"
|
|
done
|
|
|
|
SELECTION="$(printf "%s\n" "${DISPLAY_URLS[@]}" | rofi -theme-str 'window {width: 25%;} listview {columns: 1; lines: 10;}' -theme ~/.config/rofi/launchers/type-2/style-2.rasi -dmenu -l 5 -i -p "Select Documentation")"
|
|
URL="${URL_MAP[$SELECTION]}"
|
|
$BROWSER "$URL" &>/dev/null &
|