Implemented config.def.h - config.h setup
This commit is contained in:
parent
a9b458c56c
commit
5761a9018f
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
config.h
|
||||||
dwmblocks
|
dwmblocks
|
||||||
sigdwmblocks/sigdwmblocks
|
sigdwmblocks/sigdwmblocks
|
||||||
xgetrootname/xgetrootname
|
xgetrootname/xgetrootname
|
||||||
|
|
10
GNUmakefile
10
GNUmakefile
|
@ -11,6 +11,16 @@ all: dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
|
||||||
dwmblocks: dwmblocks.c config.h block.h
|
dwmblocks: dwmblocks.c config.h 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}
|
||||||
|
|
||||||
|
E0BLOCKS = $(abspath blocks)
|
||||||
|
# two level escaping of '\', one for sed and one for C
|
||||||
|
E1BLOCKS = $(subst \,\\\\,${E0BLOCKS})
|
||||||
|
# escaping special character '&' and delimiter '=' for sed
|
||||||
|
E2BLOCKS = $(subst &,\&,${E1BLOCKS})
|
||||||
|
EFBLOCKS = $(subst =,\=,${E2BLOCKS})
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
sed '2s=<path to the folder containing block scripts>=${EFBLOCKS}=' config.def.h >$@
|
||||||
|
|
||||||
sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c
|
sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c
|
||||||
${CC} -o $@ ${CFLAGS} $<
|
${CC} -o $@ ${CFLAGS} $<
|
||||||
|
|
||||||
|
|
10
README.md
10
README.md
|
@ -7,13 +7,13 @@ signaling, clickability, cursor hinting and color.
|
||||||
|
|
||||||
`dwmblocks`
|
`dwmblocks`
|
||||||
|
|
||||||
# Modifying blocks
|
# Configuration
|
||||||
|
|
||||||
Blocks are added and removed by editing [config.h](config.h) file. Some other
|
Refer to [config.h](config.def.h). It allows addition/removal of blocks and a
|
||||||
configurations can also be done through the file. Read it for more info.
|
few other configurations.
|
||||||
|
|
||||||
> Change the PATH macro defined at the top of the file. It should point to the
|
> `make`, the first time you run it, or `make config.h` will create config.h by
|
||||||
> folder where your scripts are saved.
|
> copying [config.def.h](config.def.h).
|
||||||
|
|
||||||
> The provided blocks use siji font for icons.
|
> The provided blocks use siji font for icons.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* macro for conveniently specifying pathu and pathc below */
|
/* macro for conveniently specifying pathu and pathc below */
|
||||||
#define PATH(name) "/home/ashish/.local/projects/dwmblocks/blocks/"name
|
#define PATH(name) "<path to the folder containing block scripts>/"name
|
||||||
|
|
||||||
/* buffer size for capturing output of the programs used for updating blocks */
|
/* buffer size for capturing output of the programs used for updating blocks */
|
||||||
#define CMDOUTLENGTH 50
|
#define CMDOUTLENGTH 50
|
Loading…
Reference in a new issue