aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts')
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh
index 1f2f3e48..74a8fe54 100755
--- a/config/hypr/UserScripts/RofiBeats.sh
+++ b/config/hypr/UserScripts/RofiBeats.sh
@@ -79,7 +79,9 @@ shuffle_local_music() {
# Main function for playing online music
play_online_music() {
- choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config $rofi_theme)
+ choice=$(for online in "${!online_music[@]}"; do
+ echo "$online"
+ done | sort | rofi -i -dmenu -config "$rofi_theme")
if [ -z "$choice" ]; then
exit 1
@@ -93,6 +95,7 @@ play_online_music() {
mpv --shuffle --vid=no "$link"
}
+
# Check if an online music process is running and send a notification, otherwise run the main function
pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage