summaryrefslogtreecommitdiff
path: root/monitor-current-track
blob: 6bee4625a9f1d88c1a4258769b22b05c3785240d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

tput civis
cleanup() {
    tput cnorm
}

trap cleanup EXIT
while true; do
    now-playing
    mpc status "%currenttime% / %totaltime%"
    echo
    mpc status -f '' | sed -n 3p
    # mpc idle >/dev/null
    sleep 0.3s
done