diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-02-16 11:09:08 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-16 11:09:08 +0900 |
| commit | 8acfbb16d5ef45960a13cb9768517d3c418771a6 (patch) | |
| tree | 7b618f6cca7942c3d2876740fca3963092b2da21 /config/hypr/UserScripts/RofiBeats.sh | |
| parent | 349f564bf307ad1ed99c87d028fccdecf7c1bdeb (diff) | |
| parent | 0c53ef536ca2f028672004e909daac5473e6110f (diff) | |
Merge pull request #556 from JaKooLit/development
Development to main feat. Rofi Themes
Diffstat (limited to 'config/hypr/UserScripts/RofiBeats.sh')
| -rwxr-xr-x | config/hypr/UserScripts/RofiBeats.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 380f6b29..38ff8829 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -2,11 +2,11 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # For Rofi Beats to play online Music or Locally save media files -# Directory local music folder +# Variables mDIR="$HOME/Music/" - -# Directory for icons iDIR="$HOME/.config/swaync/icons" +rofi_theme="~/.config/rofi/config-rofi-Beats.rasi" +rofi_theme_1="~/.config/rofi/config-rofi-Beats-menu.rasi" # Online Stations. Edit as required declare -A online_music=( @@ -34,7 +34,7 @@ populate_local_music() { while IFS= read -r file; do local_music+=("$file") filenames+=("$(basename "$file")") - done < <(find "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" -o -iname "*.mp4" \)) + done < <(find -L "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" -o -iname "*.mp4" \)) } # Function for displaying notifications @@ -47,7 +47,7 @@ play_local_music() { populate_local_music # Prompt the user to select a song - choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi) + choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config $rofi_theme) if [ -z "$choice" ]; then exit 1 @@ -77,7 +77,7 @@ shuffle_local_music() { # Main function for playing online music play_online_music() { - choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi) + choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config $rofi_theme) if [ -z "$choice" ]; then exit 1 @@ -101,7 +101,7 @@ fi # Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi) +user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config $rofi_theme_1) case "$user_choice" in "Play from Music Folder") |
