Reorganization

This commit is contained in:
Ashish Kumar Yadav 2021-02-10 21:19:05 +05:30
parent bc0f134dda
commit ab48cac19b
8 changed files with 14 additions and 13 deletions

6
.gitignore vendored
View file

@ -1,3 +1,3 @@
dwmblocks dwmblocks/dwmblocks
sigdwmblocks sigdwmblocks/sigdwmblocks
xgetrootname xgetrootname/xgetrootname

View file

@ -6,25 +6,25 @@ CFLAGS := -O3 -Wall -Wextra
X11CFLAGS := $(shell pkg-config --cflags x11) X11CFLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11) X11LIBS := $(shell pkg-config --libs x11)
all: dwmblocks sigdwmblocks xgetrootname all: dwmblocks/dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
dwmblocks: dwmblocks.c config.h block.h dwmblocks/dwmblocks: dwmblocks/dwmblocks.c config.h dwmblocks/block.h
${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS} ${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
sigdwmblocks: sigdwmblocks.c sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c
${CC} -o $@ ${CFLAGS} $< ${CC} -o $@ ${CFLAGS} $<
xgetrootname: xgetrootname.c xgetrootname/xgetrootname: xgetrootname/xgetrootname.c
${CC} -o $@ ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS} ${CC} -o $@ ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS}
clean: clean:
rm -f dwmblocks sigdwmblocks xgetrootname rm -f dwmblocks/dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
install: all install: all
mkdir -p ${DESTDIR}${PREFIX}/bin mkdir -p ${DESTDIR}${PREFIX}/bin
install -m 0755 dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks install -m 0755 dwmblocks/dwmblocks ${DESTDIR}${PREFIX}/bin/dwmblocks
install -m 0755 sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks install -m 0755 sigdwmblocks/sigdwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks
install -m 0755 xgetrootname ${DESTDIR}${PREFIX}/bin/xgetrootname install -m 0755 xgetrootname/xgetrootname ${DESTDIR}${PREFIX}/bin/xgetrootname
uninstall: uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks ${DESTDIR}${PREFIX}/bin/xgetrootname rm -f ${DESTDIR}${PREFIX}/bin/dwmblocks ${DESTDIR}${PREFIX}/bin/sigdwmblocks ${DESTDIR}${PREFIX}/bin/xgetrootname

View file

@ -22,7 +22,7 @@
* don't remove DELIMITERENDCHAR at the end */ * don't remove DELIMITERENDCHAR at the end */
static const char delimiter[] = { ' ', ' ', ' ', DELIMITERENDCHAR }; static const char delimiter[] = { ' ', ' ', ' ', DELIMITERENDCHAR };
#include "block.h" #include "dwmblocks/block.h"
/* If interval of a block is set to 0, the block will only be updated once at /* If interval of a block is set to 0, the block will only be updated once at
startup. startup.

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
# autostart this on startup for volume block to work
pactl subscribe | pactl subscribe |
while read -r output ; do while read -r output ; do
case $output in case $output in

View file

@ -14,7 +14,7 @@
#define DELIMITERLENGTH sizeof delimiter #define DELIMITERLENGTH sizeof delimiter
#include "config.h" #include "../config.h"
static void buttonhandler(int sig, siginfo_t *info, void *ucontext); static void buttonhandler(int sig, siginfo_t *info, void *ucontext);
static void cleanup(); static void cleanup();