diff options
Diffstat (limited to 'config/hypr/UserScripts/RofiBeats.sh')
| -rwxr-xr-x | config/hypr/UserScripts/RofiBeats.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index cde7eccf..e615aadb 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -94,6 +94,12 @@ play_online_music() { # 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" || { +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +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 -p "Select music source") |
