diff options
author | Soispha <soispha@vhack.eu> | 2023-12-17 22:44:12 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-12-17 22:44:12 +0100 |
commit | ac7b211c99ef09c591ea4a70732db2f38ca881ad (patch) | |
tree | b49444c860b7c329c4adab01a4419e46e0196a52 /hm/soispha/pkgs/scripts | |
parent | build(treewide): Update (diff) | |
download | nixos-config-ac7b211c99ef09c591ea4a70732db2f38ca881ad.zip |
feat(hm/pkgs/src/lyrics): Init
Diffstat (limited to 'hm/soispha/pkgs/scripts')
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/lyrics | 16 |
1 files changed, 16 insertions, 0 deletions
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 |