Last active
November 16, 2023 23:05
-
-
Save Xifax/d330907d9ff0c059612b9c6161650b24 to your computer and use it in GitHub Desktop.
Updated script for playing different lofi stations (MacOS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Requires https://formulae.brew.sh/formula/choose | |
# Requires https://formulae.brew.sh/cask/mpv | |
# Chmod +x lofi.sh and put it somewhere in $PATH | |
# May also set global hotkey via https://github.com/koekeishiya/skhd | |
# e.g. echo "ctrl + cmd - p : ~/lofi" >> ~/.skhdrc | |
notification() { | |
terminal-notifier -message 'Now Playing: Lofi Radio ☕️🎶' | |
} | |
menu() { | |
printf "1. chill: Lofi Girl\n" | |
printf "2. chill: Chillhop\n" | |
printf "3. chill: Box Lofi\n" | |
printf "4. chill: The Bootleg Boy\n" | |
printf "5. chill: Radio Spinner\n" | |
printf "6. chill: SmoothChill\n" | |
printf "7. chill: Boolout\n" | |
printf "8. chill: Radio Record Lo-Fi\n" | |
printf "9. anime: Anison.fm\n" | |
printf "10. anime: BakaNo\n" | |
printf "11. anime: Tsubaki\n" | |
printf "12. anime: chiru.no\n" | |
printf "13. anime: listen.moe\n" | |
printf "14. anime: r-a-d.io\n" | |
printf "15. chiptune: Rainwave\n" | |
printf "16. classics: Baroque\n" | |
printf "17. classics: Neoclassical\n" | |
printf "18. vgm: Kohina\n" | |
printf "19. vgm: RPG Gamers\n" | |
printf "20. vgm: Rainwave\n" | |
printf "21. vgm: VGM Radio\n" | |
} | |
main() { | |
choice=$(menu | choose -b ff79c6 -w 48 -n 22 | cut -d. -f1) | |
case $choice in | |
1) | |
notification | |
mpv "https://play.streamafrica.net/lofiradio" | |
break | |
;; | |
2) | |
notification | |
mpv "http://stream.zeno.fm/fyn8eh3h5f8uv" | |
break | |
;; | |
3) | |
notification | |
mpv "http://stream.zeno.fm/f3wvbbqmdg8uv" | |
break | |
;; | |
4) | |
notification | |
mpv "http://stream.zeno.fm/0r0xa792kwzuv" | |
break | |
;; | |
5) | |
notification | |
mpv "https://live.radiospinner.com/lofi-hip-hop-64" | |
break | |
;; | |
6) | |
notification | |
mpv "https://media-ssl.musicradio.com/SmoothChill" | |
break | |
;; | |
7) | |
notification | |
mpv "https://ec2.yesstreaming.net:1910/stream" | |
break | |
;; | |
8) | |
notification | |
mpv "https://radiorecord.hostingradio.ru/lofi96.aacp" | |
break | |
;; | |
9) | |
notification | |
mpv "https://anison.fm/anison.m3u" | |
break | |
;; | |
10) | |
notification | |
mpv "http://144.217.203.184:8398/listen.pls?sid=1&t=.m3u" | |
break | |
;; | |
11) | |
notification | |
mpv "http://142.4.209.132:8000/listen.pls?sid=1&t=.m3u" | |
break | |
;; | |
12) | |
notification | |
mpv "http://142.4.209.132:8000/listen.pls?sid=1&t=.m3u" | |
break | |
;; | |
13) | |
notification | |
mpv "http://stream.tsubakianimeradio.com:9000/play.mp3", | |
break | |
;; | |
14) | |
notification | |
mpv "https://relay0.r-a-d.io/main.mp3" | |
break | |
;; | |
15) | |
notification | |
mpv "https://rainwave.cc/tune_in/4.ogg.m3u" | |
break | |
;; | |
16) | |
notification | |
mpv "https://strm112.1.fm/baroque_mobile_mp3?aw_0_req.gdpr=true" | |
break | |
;; | |
17) | |
notification | |
mpv "http://s02.radio-tochka.com:4630/stream" | |
break | |
;; | |
18) | |
notification | |
mpv "https://kohina.duckdns.org/icecast/stream.ogg" | |
break | |
;; | |
19) | |
notification | |
mpv "http://www.rpgamers.net/radio/radio.m3u" | |
break | |
;; | |
20) | |
notification | |
mpv "https://rainwave.cc/tune_in/1.ogg.m3u" | |
break | |
;; | |
21) | |
notification | |
mpv "https://vgmradio.com/vgmradio.m3u" | |
break | |
;; | |
esac | |
} | |
pkill -f http || main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment