123456789101112131415161718192021222324 |
- #!/usr/bin/env bash
- # Copyright ©2017-2023 Jason Trunks
- # https://notabug.org/JasKinasis/cmus-scripts
- # An example usage of nowplay
- # This is meant to be ran in a pane in something like screen or tmux.
- # It runs indefinitely and periodically polls cmus to see what is playing.
- # If the track name has changed, the display will update
- # Kill it with ctrl+c
- # Note: I have added a calendar and date/time along with the track info.
- # You could add any other information you want to display, or just leave it
- # with just the track information.
- prev=""
- while true; do
- now=$(nowplay);
- if [[ "$now" != "$prev" ]]; then
- prev=$now
- clear;cal;echo;date;echo; echo "$now";#echo "$prev" # extra echo for debug
- fi
- sleep 5;
- done
|