Skip to content

Commit

Permalink
added blocks.def.h to act as default blocks file so that changes made in
Browse files Browse the repository at this point in the history
the future will not affect csutom blocks.h files.
  • Loading branch information
torrinfail committed Aug 12, 2020
1 parent 8893f2d commit 7e0bc3f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Custom blocks file
blocks.h

# Prerequisites
*.d

Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
PREFIX ?= /usr/local
CC ?= cc
output: dwmblocks.c blocks.h
${CC} dwmblocks.c `pkg-config --cflags x11` `pkg-config --libs x11` -o dwmblocks

output: dwmblocks.c blocks.def.h blocks.h
cc `pkg-config --cflags x11` `pkg-config --libs x11` dwmblocks.c -o dwmblocks
blocks.h:
cp blocks.def.h $@


clean:
rm -f *.o *.gch dwmblocks
install: output
Expand Down
10 changes: 10 additions & 0 deletions blocks.def.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0},

{"", "date '+%b %d (%a) %I:%M%p'", 5, 0},
};

//sets delimeter between status commands. NULL character ('\0') means no delimeter.
static char delim = '|';
20 changes: 0 additions & 20 deletions blocks.h

This file was deleted.

0 comments on commit 7e0bc3f

Please sign in to comment.