Created
October 26, 2023 14:47
-
-
Save naranyala/8d2cf8bc06bd2e88e71128cb03cce4b0 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 an associative array of dir_path | |
declare -A dir_path | |
dir_path["AUD-adrenaline"]="/media/naranyala/DiskD/Collections/AUD adrenaline/" | |
dir_path["AUD-modern-songs"]="/media/naranyala/DiskD/Collections/AUD modern-songs/" | |
dir_path["AUD-new-all"]="/media/naranyala/DiskD/Collections/AUD new-all/" | |
# Use Rofi to select a custom directory | |
selected_path=$(printf '%s\n' "${!dir_path[@]}" | rofi -dmenu -i -p "Goto DIR with VLC: ") | |
# Check if the user made a selection | |
if [ -n "$selected_path" ]; then | |
vlc "${dir_path[$selected_path]}" & | |
else | |
notify-send "ERR" "Invalid path or no path selected!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment