Last active
December 28, 2024 14:33
-
-
Save naranyala/037f2ad8bd3262bfbc5dd6ba5aa61c3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEFAULT_BROWSER="brave" | |
# Declare a custom array of websites | |
declare -A websites | |
websites["google"]="https://google.com/" | |
websites["youtube"]="https://youtube.com/" | |
websites["x-twitter"]="https://x.com" | |
# websites[""]="https://%s" | |
# Use Rofi to select a custom website | |
selected_website=$(echo "${!websites[@]}" | tr ' ' '\n' | sort | rofi -dmenu -p "Web Bookmarks:") | |
# Prompt the user for a search query | |
if [ -n "$selected_website" ]; then | |
final_destination="${websites[$selected_website]}" | |
xdg-open "$final_destination" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment