From 0476ad02cc0c813266ef8c80ea1796f187c94884 Mon Sep 17 00:00:00 2001 From: Lamido Tijjani Date: Wed, 26 Jun 2024 12:05:22 +0100 Subject: fix: Correct logic for local music playback to start from selected track - Adjusted logic to use the full path stored in the `local_music` array instead of "$mDIR/$choice" - Modified `play_local_music` function to use `${local_music[@]}` for `mpv` command. - Ensured the entire playlist is considered when starting from a specific index. --- config/hypr/UserScripts/RofiBeats.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 7a7ac3f5..b9e9ba01 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -56,16 +56,9 @@ play_local_music() { notification "$choice" - # For some reason wont start playlist at 0 - if [[ $i -eq 0 ]]; then - # Play the selected local music file using mpv - mpv --loop-playlist --vid=no "$mDIR/$choice" - - else - file=$i - # Play the selected local music file using mpv - mpv --playlist-start="$file" --loop-playlist --vid=no "$mDIR/$choice" - fi + # Play the selected local music file using mpv + mpv --playlist-start="$i" --loop-playlist --vid=no "${local_music[@]}" + break fi done -- cgit v1.2.3 From 39ec4bdf20139f8c2727c59e566d4257b587dbff Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 4 Jul 2024 10:59:53 +0900 Subject: updated rofi-beats.sh --- config/hypr/UserScripts/RofiBeats.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index b9e9ba01..aa9f62e8 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -10,18 +10,18 @@ iDIR="$HOME/.config/swaync/icons" # Online Stations. Edit as required declare -A online_music=( - ["AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" - ["Lofi Girl ☕️🎶"]="https://play.streamafrica.net/lofiradio" - ["Easy Rock 96.3 FM 📻🎶"]="https://radio-stations-philippines.com/easy-rock" - ["Wish 107.5 FM 📻🎶"]="https://radio-stations-philippines.com/dwnu-1075-wish" - ["Wish 107.5 YT Pinoy HipHop 🎻🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJnmgMYwCKid4XIFqUKBVWEs&si=vahW_noh4UDJ5d37" - ["Top Youtube Music 2023 ☕️🎶"]="https://youtube.com/playlist?list=PLDIoUOhQQPlXr63I_vwF9GD8sAKh77dWU&si=y7qNeEVFNgA-XxKy" - ["Wish 107.5 YT Wishclusives ☕️🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJn5B22H9HOWP3Kxxs-DkPSM&si=d_Ld2OKhGvpH48WO" - ["Chillhop ☕️🎶"]="http://stream.zeno.fm/fyn8eh3h5f8uv" - ["SmoothChill ☕️🎶"]="https://media-ssl.musicradio.com/SmoothChill" - ["Relaxing Music ☕️🎶"]="https://youtube.com/playlist?list=PLMIbmfP_9vb8BCxRoraJpoo4q1yMFg4CE" - ["Youtube Remix 📻🎶"]="https://youtube.com/playlist?list=PLeqTkIUlrZXlSNn3tcXAa-zbo95j0iN-0" - ["Korean Drama OST 📻🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" + ["Lofi Girl Radio ☕️🎶"]="https://play.streamafrica.net/lofiradio" + ["FM - Easy Rock 96.3 📻🎶"]="https://radio-stations-philippines.com/easy-rock" + ["FM - WRock - CEBU 96.3 📻🎶"]="https://onlineradio.ph/126-96-3-wrock.html" + ["YT - Wish 107.5 YT Pinoy HipHop 🎻🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJnmgMYwCKid4XIFqUKBVWEs&si=vahW_noh4UDJ5d37" + ["YT - Top Youtube Music 2023 ☕️🎶"]="https://youtube.com/playlist?list=PLDIoUOhQQPlXr63I_vwF9GD8sAKh77dWU&si=y7qNeEVFNgA-XxKy" + ["YT - Wish 107.5 YT Wishclusives ☕️🎶"]="https://youtube.com/playlist?list=PLkrzfEDjeYJn5B22H9HOWP3Kxxs-DkPSM&si=d_Ld2OKhGvpH48WO" + ["Chillhop Radio ☕️🎶"]="http://stream.zeno.fm/fyn8eh3h5f8uv" + ["FM - Fresh Philippines ☕️🎶"]="https://onlineradio.ph/553-fresh-fm.html" + ["YT - Relaxing Music ☕️🎶"]="https://youtube.com/playlist?list=PLMIbmfP_9vb8BCxRoraJpoo4q1yMFg4CE" + ["YT - Youtube Remix 📻🎶"]="https://youtube.com/playlist?list=PLeqTkIUlrZXlSNn3tcXAa-zbo95j0iN-0" + ["YT - Korean Drama OST 📻🎶"]="https://youtube.com/playlist?list=PLUge_o9AIFp4HuA-A3e3ZqENh63LuRRlQ" + ["YT - AfroBeatz 2024 🎧"]="https://www.youtube.com/watch?v=7uB-Eh9XVZQ" ) # Populate local_music array with files from music directory and subdirectories -- cgit v1.2.3 From ed9b40823b2b6227a8ba3257d8a49e43072ddad2 Mon Sep 17 00:00:00 2001 From: Ecys <73040912+Eccys@users.noreply.github.com> Date: Sat, 6 Jul 2024 05:10:01 +0000 Subject: Put random wallpaper in random selection Shows preview of random wallpaper instead of blank screen. --- config/hypr/UserScripts/WallpaperSelect.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 06859112..d2ca7c28 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -33,8 +33,8 @@ rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" # Sorting Wallpapers menu() { sorted_options=($(printf '%s\n' "${PICS[@]}" | sort)) - # Place ". random" at the beginning - printf "%s\n" "$RANDOM_PIC_NAME" + # Place ". random" at the beginning with the random picture as an icon + printf "%s\x00icon\x1f%s\n" "$RANDOM_PIC_NAME" "$RANDOM_PIC" for pic_path in "${sorted_options[@]}"; do pic_name=$(basename "$pic_path") # Displaying .gif to indicate animated images @@ -59,7 +59,6 @@ main() { # Random choice case if [ "$choice" = "$RANDOM_PIC_NAME" ]; then - RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" swww img -o $focused_monitor "${RANDOM_PIC}" $SWWW_PARAMS exit 0 fi -- cgit v1.2.3