Explorar el Código

Add config.def.h

master
sin hace 10 años
padre
commit
43fa667cd6
Se han modificado 3 ficheros con 16 adiciones y 11 borrados
  1. +6
    -2
      Makefile
  2. +9
    -0
      config.def.h
  3. +1
    -9
      noice.c

+ 6
- 2
Makefile Ver fichero

@@ -6,10 +6,14 @@ BIN = noice

all: $(BIN)

$(BIN): $(OBJ)
$(BIN): config.h $(OBJ)
$(CC) -o $@ $(OBJ) $(LDLIBS)

noice.o: noice.c queue.h util.h
config.h:
@echo copying config.def.h to $@
@cp config.def.h $@

noice.o: noice.c util.h
$(CC) -c noice.c

strlcpy.o: strlcpy.c util.h


+ 9
- 0
config.def.h Ver fichero

@@ -0,0 +1,9 @@
/* Configuration */
struct assoc assocs[] = {
{ "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" },
{ "\\.(png|jpg|gif)$", "feh" },
{ "\\.(html|svg)$", "firefox" },
{ "\\.pdf$", "mupdf" },
{ "\\.sh$", "sh" },
{ ".*", "less" },
};

+ 1
- 9
noice.c Ver fichero

@@ -43,15 +43,7 @@ struct assoc {
char *bin; /* Program */
};

/* Configuration */
struct assoc assocs[] = {
{ "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" },
{ "\\.(png|jpg|gif)$", "feh" },
{ "\\.(html|svg)$", "firefox" },
{ "\\.pdf$", "mupdf" },
{ "\\.sh$", "sh" },
{ ".*", "less" },
};
#include "config.h"

struct entry {
char *name;


Cargando…
Cancelar
Guardar