dotfiles/.i3blocks/mocp

18 lines
321 B
Bash
Executable file

#!/bin/bash
case $BLOCK_BUTTON in
1) mocp -r ;;
2) mocp -G ;;
3) mocp -f ;;
4) mocp -j $(($(mocp -Q "%cs") - 5))s ;;
5) mocp -j $(($(mocp -Q "%cs") + 5))s ;;
esac
status=$(mocp -Q "%state")
case $status in
STOP ) status="[]" ;;
PAUSE ) status="||" ;;
PLAY ) status=" >" ;;
esac
echo $status $(mocp -Q "%song")