From ac7b211c99ef09c591ea4a70732db2f38ca881ad Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 17 Dec 2023 22:44:12 +0100 Subject: feat(hm/pkgs/src/lyrics): Init --- hm/soispha/pkgs/scripts/wrappers/lyrics | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 hm/soispha/pkgs/scripts/wrappers/lyrics (limited to 'hm/soispha/pkgs/scripts/wrappers') diff --git a/hm/soispha/pkgs/scripts/wrappers/lyrics b/hm/soispha/pkgs/scripts/wrappers/lyrics new file mode 100755 index 00000000..95096a28 --- /dev/null +++ b/hm/soispha/pkgs/scripts/wrappers/lyrics @@ -0,0 +1,16 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.8.0" . %SHELL_LIBRARY_PATH + + +out="$(mktmp)" + +print " " > "$out" +( + cd "$XDG_MUSIC_DIR" || die "No music dir!" + mediainfo --Output=JSON "$(mpc --format '%file%' current)" | jq -r '.media.track[0].Lyrics' | sed 's|/|\n|g' >> "$out" +) +cat "$out" + +# vim: ft=sh -- cgit 1.4.1