about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/lyrics
blob: 22827caf21173e80db25fd171ed535f9f3c6c0e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"
)
less "$out"

# vim: ft=sh