aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/RofiBeats.sh
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-01-12 12:50:56 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-01-12 12:50:56 +0900
commit5df8cb82ccb01fefbd70aa059a326925b9ea98d6 (patch)
treedf8574e37a139dd8e41de64aef2134592075fd42 /config/hypr/UserScripts/RofiBeats.sh
parent22a7c6a47cda11a78727e9c903841b2f3273f52c (diff)
some changes on scripts which depends on rofi. Downside is only way to close the rofi is pressing esc button. However, you can execute immediately the script. ie., rofi menu is opened, by pressing Super W, it will execute wallpaper menu immediately.
Diffstat (limited to 'config/hypr/UserScripts/RofiBeats.sh')
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh6
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")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage