about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/lyrics
diff options
context:
space:
mode:
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