From 17eafba19473953dc158ee7de0f8e235236787c7 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Thu, 19 Oct 2023 13:30:25 -0500 Subject: [PATCH] Adding eradio to Emacs --- .config/emacs/config.el | 31 +++++++++++++++++++++++++++++++ .config/emacs/config.org | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 6d60710..cece824 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -100,6 +100,30 @@ :config (setq elfeed-goodies/entry-pane-size 0.5)) +(use-package eradio + :init + (setq eradio-player '("mpv" "--no-video" "--no-terminal")) + :config + (setq eradio-channels '(("Totally 80s FM" . "https://zeno.fm/radio/totally-80s-fm/") + ("Oldies Radio 50s-60s" . "https://zeno.fm/radio/oldies-radio-50s-60s/") + ("Oldies Radio 70s" . "https://zeno.fm/radio/oldies-radio-70s/") + ("Unlimited 80s" . "https://zeno.fm/radio/unlimited80s/") + ("80s Hits" . "https://zeno.fm/radio/80shits/") + ("90s Hits" . "https://zeno.fm/radio/90s_HITS/") + ("2000s Pop" . "https://zeno.fm/radio/2000s-pop/") + ("The 2000s" . "https://zeno.fm/radio/the-2000s/") + ("Hits 2010s" . "https://zeno.fm/radio/helia-hits-2010/") + ("Classical Radio" . "https://zeno.fm/radio/classical-radio/") + ("Classical Relaxation" . "https://zeno.fm/radio/radio-christmas-non-stop-classical/") + ("Classic Rock" . "https://zeno.fm/radio/classic-rockdnb2sav8qs8uv/") + ("Gangsta49" . "https://zeno.fm/radio/gangsta49/") + ("HipHop49" . "https://zeno.fm/radio/hiphop49/") + ("Madhouse Country Radio" . "https://zeno.fm/radio/madhouse-country-radio/") + ("PopMusic" . "https://zeno.fm/radio/popmusic74vyurvmug0uv/") + ("PopStars" . "https://zeno.fm/radio/popstars/") + ("RadioMetal" . "https://zeno.fm/radio/radio-metal/") + ("RocknRoll Radio" . "https://zeno.fm/radio/rocknroll-radio994c7517qs8uv/")))) + ;; Expands to: (elpaca evil (use-package evil :demand t)) (use-package evil :init ;; tweak evil's configuration before loading it @@ -333,6 +357,13 @@ ;; set for us, so no need to specify each individually. (dt/leader-keys "p" '(projectile-command-map :wk "Projectile")) + + (dt/leader-keys + "r" '(:ignore t :wk "Radio") + "r p" '(eradio-play :wk "Eradio play") + "r s" '(eradio-stop :wk "Eradio stop") + "r t" '(eradio-toggle :wk "Eradio toggle")) + (dt/leader-keys "s" '(:ignore t :wk "Search") diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 30d8f1c..bc1228d 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -15,6 +15,7 @@ - [[#diminish][DIMINISH]] - [[#dired][DIRED]] - [[#elfeed][ELFEED]] +- [[#eradio][ERADIO]] - [[#evil][EVIL]] - [[#flycheck][FLYCHECK]] - [[#fonts][FONTS]] @@ -200,7 +201,34 @@ An RSS newsfeed reader for Emacs. Move through the articles with 'j/k'. Move t #+end_src -#+RESULTS: +* ERADIO +[[https://github.com/olavfosse/eradio][eradio]] is a simple Internet radio player for Emacs. It uses 'vlc as its backend by default, but you can change the =eradio-player= variable to use another multimedia player. I have set eradio to use 'mpv' instead of 'vlc' because it supports more types of Internet radio streams. + +#+begin_src emacs-lisp +(use-package eradio + :init + (setq eradio-player '("mpv" "--no-video" "--no-terminal")) + :config + (setq eradio-channels '(("Totally 80s FM" . "https://zeno.fm/radio/totally-80s-fm/") + ("Oldies Radio 50s-60s" . "https://zeno.fm/radio/oldies-radio-50s-60s/") + ("Oldies Radio 70s" . "https://zeno.fm/radio/oldies-radio-70s/") + ("Unlimited 80s" . "https://zeno.fm/radio/unlimited80s/") + ("80s Hits" . "https://zeno.fm/radio/80shits/") + ("90s Hits" . "https://zeno.fm/radio/90s_HITS/") + ("2000s Pop" . "https://zeno.fm/radio/2000s-pop/") + ("The 2000s" . "https://zeno.fm/radio/the-2000s/") + ("Hits 2010s" . "https://zeno.fm/radio/helia-hits-2010/") + ("Classical Radio" . "https://zeno.fm/radio/classical-radio/") + ("Classical Relaxation" . "https://zeno.fm/radio/radio-christmas-non-stop-classical/") + ("Classic Rock" . "https://zeno.fm/radio/classic-rockdnb2sav8qs8uv/") + ("Gangsta49" . "https://zeno.fm/radio/gangsta49/") + ("HipHop49" . "https://zeno.fm/radio/hiphop49/") + ("Madhouse Country Radio" . "https://zeno.fm/radio/madhouse-country-radio/") + ("PopMusic" . "https://zeno.fm/radio/popmusic74vyurvmug0uv/") + ("PopStars" . "https://zeno.fm/radio/popstars/") + ("RadioMetal" . "https://zeno.fm/radio/radio-metal/") + ("RocknRoll Radio" . "https://zeno.fm/radio/rocknroll-radio994c7517qs8uv/")))) +#+end_src * EVIL [[https://github.com/emacs-evil/evil][Evil]] is an extensible vi/vim layer for Emacs. Because...let's face it. The Vim keybindings are just plain better. @@ -461,6 +489,13 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR ;; set for us, so no need to specify each individually. (dt/leader-keys "p" '(projectile-command-map :wk "Projectile")) + + (dt/leader-keys + "r" '(:ignore t :wk "Radio") + "r p" '(eradio-play :wk "Eradio play") + "r s" '(eradio-stop :wk "Eradio stop") + "r t" '(eradio-toggle :wk "Eradio toggle")) + (dt/leader-keys "s" '(:ignore t :wk "Search")