songchange 328 B

1234
  1. #!/bin/sh
  2. [ -e /tmp/panel ] && mocp -M "$XDG_CONFIG_HOME"moc -Q '%artist - %song' | iconv -f UTF-8 -t ASCII//TRANSLIT | awk 'BEGIN { printf("X") } length > 41 { gsub("[,()]","",$0); for (i=1; i<=NF; i++) { printf(substr($i, 1, 1)) } } length < 41 { printf($0) } length == 41 { printf($0) } END { printf("\n") } ' > /tmp/panel