diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-08-29 13:02:01 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-08-29 13:07:26 +0200 |
commit | f97f73d03f1ea7b6db6a3ef7d3756680f566f191 (patch) | |
tree | 8d805afd655cf7967d27c23cb0855b0e289c1d53 /src/settings.c | |
parent | b8cf55c28e131ebdcb0a32fe0e8c14fefebebcea (diff) | |
download | pianobar-f97f73d03f1ea7b6db6a3ef7d3756680f566f191.tar.gz pianobar-f97f73d03f1ea7b6db6a3ef7d3756680f566f191.tar.bz2 pianobar-f97f73d03f1ea7b6db6a3ef7d3756680f566f191.zip |
Customizeable list format (songs)
Fixes #151
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c index 49d75e6..9867b47 100644 --- a/src/settings.c +++ b/src/settings.c @@ -91,6 +91,7 @@ void BarSettingsDestroy (BarSettings_t *settings) { free (settings->atIcon); free (settings->npSongFormat); free (settings->npStationFormat); + free (settings->listSongFormat); free (settings->fifo); for (size_t i = 0; i < MSG_COUNT; i++) { free (settings->msgFormat[i].prefix); @@ -127,6 +128,7 @@ void BarSettingsRead (BarSettings_t *settings) { settings->atIcon = strdup (" @ "); settings->npSongFormat = strdup ("\"%t\" by \"%a\" on \"%l\"%r%@%s"); settings->npStationFormat = strdup ("Station \"%n\" (%i)"); + settings->listSongFormat = strdup ("%i) %a - %t%r"); settings->fifo = malloc (PATH_MAX * sizeof (*settings->fifo)); BarGetXdgConfigDir (PACKAGE "/ctl", settings->fifo, PATH_MAX); @@ -231,6 +233,9 @@ void BarSettingsRead (BarSettings_t *settings) { } else if (streq ("format_nowplaying_station", key)) { free (settings->npStationFormat); settings->npStationFormat = strdup (val); + } else if (streq ("format_list_song", key)) { + free (settings->listSongFormat); + settings->listSongFormat = strdup (val); } else if (streq ("fifo", key)) { free (settings->fifo); settings->fifo = strdup (val); |