diff --git a/.bauke/scripts/tauon-controls.ts b/.bauke/scripts/tauon-controls.ts index e65a01d..dcfe0b0 100644 --- a/.bauke/scripts/tauon-controls.ts +++ b/.bauke/scripts/tauon-controls.ts @@ -79,6 +79,7 @@ async function main(): Promise { } } +/** The status data from Tauon's remote API. */ type Status = { album: string; artist: string; @@ -90,10 +91,12 @@ type Status = { }; }; +/** Get the {@linkcode Status} from Tauon's remote API. */ async function getStatus(): Promise { return await (await fetch(`${remoteApi}/status`)).json(); } +/** Run a `notify-send` with the current song's artist and title. */ async function notifyCurrentSong(): Promise { const status = await getStatus(); await runCommand("notify-send", {