about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-17 22:44:12 +0100
committerSoispha <soispha@vhack.eu>2023-12-17 22:44:12 +0100
commitac7b211c99ef09c591ea4a70732db2f38ca881ad (patch)
treeb49444c860b7c329c4adab01a4419e46e0196a52 /hm/soispha/pkgs/scripts/wrappers
parentbuild(treewide): Update (diff)
downloadnixos-config-ac7b211c99ef09c591ea4a70732db2f38ca881ad.zip
feat(hm/pkgs/src/lyrics): Init
Diffstat (limited to '')
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/lyrics16
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