aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/RofiBeats.sh
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2025-02-23 14:46:19 +0900
committerGitHub <noreply@github.com>2025-02-23 14:46:19 +0900
commit91b9177b0ff5d2fac7b99be9a89f8e9f054347fd (patch)
tree5b11da646166995b52bb597cf6a92703d1f5a0a2 /config/hypr/UserScripts/RofiBeats.sh
parent9f5b41c3e230cda406592167fcd0446a5f56821c (diff)
parentb8ab57be1c8e579e69e5bfd56668815465d71785 (diff)
Merge pull request #577 from JaKooLit/development
Development to main Dots version 2.3.12
Diffstat (limited to 'config/hypr/UserScripts/RofiBeats.sh')
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh
index 1f2f3e48..4587e720 100755
--- a/config/hypr/UserScripts/RofiBeats.sh
+++ b/config/hypr/UserScripts/RofiBeats.sh
@@ -5,8 +5,8 @@
# Variables
mDIR="$HOME/Music/"
iDIR="$HOME/.config/swaync/icons"
-rofi_theme="~/.config/rofi/config-rofi-Beats.rasi"
-rofi_theme_1="~/.config/rofi/config-rofi-Beats-menu.rasi"
+rofi_theme="$HOME/.config/rofi/config-rofi-Beats.rasi"
+rofi_theme_1="$HOME/.config/rofi/config-rofi-Beats-menu.rasi"
# Online Stations. Edit as required
declare -A online_music=(
@@ -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