Haui's bytes

news, diary, journal, whatever

shuffle/repeat patch for moc

A lot ofmoc’s functions can be easily controlled via command-line switches.  Unfortunately, by default, there’s no way to determine whether shuffle/repeat is turned on or off, without checking the ncurses-interface of moc. So, I created a small patch, that enables moc to display these two values along with the song information on the command-line.

Applying this patch is pretty easy:

patch interface.c patch

Example for the altered output:

State: PAUSE
File: /my/favorite/musicfile.mp3
Title: foobar
Artist: foo
SongTitle: foobar
Album: bar
TotalTime: 01:28
TimeLeft: 00:54
TotalSec: 88
CurrentTime: 00:34
CurrentSec: 34
Bitrate: 192Kbps
AvgBitrate: 199Kbps
Rate: 44KHz
Shuffle: on
Repeat: off

Download