summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-08-23 17:26:02 +0200
committerLars-Dominik Braun <lars@6xq.net>2011-08-23 17:26:02 +0200
commitb8cf55c28e131ebdcb0a32fe0e8c14fefebebcea (patch)
treeea01c8c1d9979a1f83d3b56ffb830ebdfea23c4f /src/main.c
parentdf557e9c75d23a66c99a6fdad07b384f7636cb9c (diff)
downloadpianobar-b8cf55c28e131ebdcb0a32fe0e8c14fefebebcea.tar.gz
pianobar-b8cf55c28e131ebdcb0a32fe0e8c14fefebebcea.tar.bz2
pianobar-b8cf55c28e131ebdcb0a32fe0e8c14fefebebcea.zip
Configureable fifo path
See #149.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index ece6909..c103bdd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -326,7 +326,6 @@ static void BarMainLoop (BarApp_t *app) {
int main (int argc, char **argv) {
static BarApp_t app;
- char ctlPath[PATH_MAX];
/* terminal attributes _before_ we started messing around with ~ECHO */
struct termios termOrig;
@@ -363,14 +362,13 @@ int main (int argc, char **argv) {
app.input.fds[0] = STDIN_FILENO;
FD_SET(app.input.fds[0], &app.input.set);
- BarGetXdgConfigDir (PACKAGE "/ctl", ctlPath, sizeof (ctlPath));
/* open fifo read/write so it won't EOF if nobody writes to it */
assert (sizeof (app.input.fds) / sizeof (*app.input.fds) >= 2);
- app.input.fds[1] = open (ctlPath, O_RDWR);
+ app.input.fds[1] = open (app.settings.fifo, O_RDWR);
if (app.input.fds[1] != -1) {
FD_SET(app.input.fds[1], &app.input.set);
BarUiMsg (&app.settings, MSG_INFO, "Control fifo at %s opened\n",
- ctlPath);
+ app.settings.fifo);
}
app.input.maxfd = app.input.fds[0] > app.input.fds[1] ? app.input.fds[0] :
app.input.fds[1];