Created
October 26, 2023 14:59
-
-
Save naranyala/aa990638e46645b3379a18d854500816 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 | |
# Declare a custom array of dir_path | |
declare -A dir_path | |
dir_path["Downloads"]="$HOME/Downloads/" | |
dir_path["Pictures"]="$HOME/Pictures/" | |
dir_path["repos"]="$HOME/repos" | |
dir_path["dotfiles"]="$HOME/dotfiles" | |
# Use Rofi to select a custom website | |
# selected_path=$(echo "${!dir_path[@]}" | tr ' ' '\n' | rofi -dmenu -p "Goto DIR Thunar:") | |
selected_path=$(printf '%s\n' "${!dir_path[@]}" | rofi -dmenu -i -p "Goto DIR with Thunar: ") | |
# Prompt the user for a search query | |
if [ -n "$selected_path" ]; then | |
thunar "${dir_path[$selected_path]}" & | |
else | |
notify-send "ERR" "invalid path!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment