From 663f2dc4ae2f74e085ceee1d4d67666ac2e6f7e2 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Thu, 2 Jan 2025 13:01:35 +0800 Subject: [PATCH] [feat] add .hy suffix for chill-player - format code --- files/bin/{chill-player => chill-player.hy} | 10 +++++----- home-configuration.scm | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename files/bin/{chill-player => chill-player.hy} (64%) diff --git a/files/bin/chill-player b/files/bin/chill-player.hy similarity index 64% rename from files/bin/chill-player rename to files/bin/chill-player.hy index a277de9..8309c1f 100755 --- a/files/bin/chill-player +++ b/files/bin/chill-player.hy @@ -7,10 +7,10 @@ (defn live-play [live-id] (while True (for [item (.json (requests.get f"https://stream.chillhop.com/live/{live-id}"))] - (print f"Now playing: {(:title item)} - {(:artists item)} - {(:fileId item)}") - (subprocess.run f"mpv --no-video https://stream.chillhop.com/mp3/{(:fileId item)}" - :shell True - :capture_output True)))) + (print f"Now playing: {(:title item)} - {(:artists item)} - {(:fileId item)}") + (subprocess.run f"mpv --no-video https://stream.chillhop.com/mp3/{(:fileId item)}" + :shell True + :capture_output True)))) (setv parser (argparse.ArgumentParser)) (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")))] (print "Now streaming...") (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: "))) diff --git a/home-configuration.scm b/home-configuration.scm index ce62c41..493566b 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -56,7 +56,7 @@ (".config/hypr/hyprlock.conf" ,(local-file "files/hyprlock.conf")) (".config/hypr/hyprpaper.conf" ,(local-file "files/hyprpaper.conf")) ;; 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 (home-zsh-configuration