about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/lyrics
blob: a72eede18105ddd312267bfe88633871e4f8650c (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.9.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