[feat] add .hy suffix for chill-player
- format code
This commit is contained in:
parent
ccb67f7990
commit
663f2dc4ae
2 changed files with 6 additions and 6 deletions
|
@ -7,10 +7,10 @@
|
||||||
(defn live-play [live-id]
|
(defn live-play [live-id]
|
||||||
(while True
|
(while True
|
||||||
(for [item (.json (requests.get f"https://stream.chillhop.com/live/{live-id}"))]
|
(for [item (.json (requests.get f"https://stream.chillhop.com/live/{live-id}"))]
|
||||||
(print f"Now playing: {(:title item)} - {(:artists item)} - {(:fileId item)}")
|
(print f"Now playing: {(:title item)} - {(:artists item)} - {(:fileId item)}")
|
||||||
(subprocess.run f"mpv --no-video https://stream.chillhop.com/mp3/{(:fileId item)}"
|
(subprocess.run f"mpv --no-video https://stream.chillhop.com/mp3/{(:fileId item)}"
|
||||||
:shell True
|
:shell True
|
||||||
:capture_output True))))
|
:capture_output True))))
|
||||||
|
|
||||||
(setv parser (argparse.ArgumentParser))
|
(setv parser (argparse.ArgumentParser))
|
||||||
(parser.add_argument "-s" :action "store" :dest "station" :metavar "station" :required False)
|
(parser.add_argument "-s" :action "store" :dest "station" :metavar "station" :required False)
|
||||||
|
@ -20,5 +20,5 @@
|
||||||
(let [presets (:presets (.json (requests.get "https://stream.chillhop.com/presets")))]
|
(let [presets (:presets (.json (requests.get "https://stream.chillhop.com/presets")))]
|
||||||
(print "Now streaming...")
|
(print "Now streaming...")
|
||||||
(for [item presets]
|
(for [item presets]
|
||||||
(print f"Name: {(:name item)} station Id: {(:stationId item)}"))
|
(print f"Name: {(:name item)} station Id: {(:stationId item)}"))
|
||||||
(live-play (input "Input station ID: ")))
|
(live-play (input "Input station ID: ")))
|
|
@ -56,7 +56,7 @@
|
||||||
(".config/hypr/hyprlock.conf" ,(local-file "files/hyprlock.conf"))
|
(".config/hypr/hyprlock.conf" ,(local-file "files/hyprlock.conf"))
|
||||||
(".config/hypr/hyprpaper.conf" ,(local-file "files/hyprpaper.conf"))
|
(".config/hypr/hyprpaper.conf" ,(local-file "files/hyprpaper.conf"))
|
||||||
;; bin
|
;; bin
|
||||||
(".local/bin/chill-player" ,(local-file "files/bin/chill-player" #:recursive? #t))
|
(".local/bin/chill-player" ,(local-file "files/bin/chill-player.hy" #:recursive? #t))
|
||||||
))
|
))
|
||||||
(service home-zsh-service-type
|
(service home-zsh-service-type
|
||||||
(home-zsh-configuration
|
(home-zsh-configuration
|
||||||
|
|
Loading…
Reference in a new issue