Created
December 24, 2023 02:23
-
-
Save naranyala/4773d3c0341dd30d9f3188175bfe0ce0 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"]="google.com" | |
websites["github"]="github.com" | |
websites["twitter"]="twitter.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