diff options
Diffstat (limited to 'monitor-current-track')
| -rwxr-xr-x | monitor-current-track | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/monitor-current-track b/monitor-current-track new file mode 100755 index 0000000..6bee462 --- /dev/null +++ b/monitor-current-track @@ -0,0 +1,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 |
