Browse Source

Make the plumber configurable in config.h.

master
Christoph Lohmann 5 years ago
committed by Quentin Rameau
parent
commit
d03c161c2a
  1. 5
      Makefile
  2. 4
      config.def.h
  3. 4
      sacc.c

5
Makefile

@ -9,7 +9,10 @@ OBJ = $(BIN:=.o) ui_$(UI).o
all: $(BIN)
$(BIN): config.mk common.h $(OBJ)
config.h:
cp config.def.h config.h
$(BIN): config.h config.mk common.h $(OBJ)
$(CC) $(OBJ) $(SACCLDFLAGS) -o $@
clean:

4
config.def.h

@ -0,0 +1,4 @@
/* See LICENSE file for copyright and license details. */
static char *plumber = "xdg-open";

4
sacc.c

@ -20,6 +20,8 @@
#include "common.h"
#include "config.h"
static char *mainurl;
static Item *mainentry;
static int parent = 1;
@ -471,7 +473,7 @@ plumb(char *url)
return;
case 0:
parent = 0;
if (execlp("xdg-open", "xdg-open", url, NULL) < 0)
if (execlp(plumber, plumber, url, NULL) < 0)
die("execlp: %s", strerror(errno));
}
}

Loading…
Cancel
Save