Last active
February 23, 2024 10:10
-
-
Save naranyala/5df85e190391f59c5f0eab71c8fae4e9 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 | |
PATH_MEDIA="/media" | |
PATH_HOME="/home" | |
# Declare a custom array of dirs | |
declare -A dirs | |
dirs["dir:category:subcategory"]="$PATH_MEDIA/public-repos" | |
dirs["dir:category:subcategory"]="$PATH_MEDIA/private-repos" | |
dirs["dir:subcategory:project-name"]="$PATH_HOME/project-a" | |
dirs["dir:subcategory:project-name"]="$PATH_HOME/project-b" | |
# dirs[""]="/home" | |
# Use Rofi to select a custom website | |
selected_directory=$(echo "${!dirs[@]}" | tr ' ' '\n' | sort | rofi -dmenu -p "Directory Bookmarks: ") | |
# Prompt the user for a search query | |
if [ -n "$selected_directory" ]; then | |
final_destination="${dirs[$selected_directory]}" | |
notify-send "opening: $final_destination" | |
pcmanfm -n "$final_destination" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment