aboutsummaryrefslogtreecommitdiff
path: root/x11/dwmblocks
diff options
context:
space:
mode:
authorNeel Chauhan <nc@FreeBSD.org>2021-08-08 12:17:06 +0000
committerNeel Chauhan <nc@FreeBSD.org>2021-08-08 12:18:02 +0000
commit273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf (patch)
tree0e8f7d725021801facac823584f556f6525eeaba /x11/dwmblocks
parent0b939ca2f61f1cf3ebdaaa1b64bf23434de057a7 (diff)
downloadports-273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf.tar.gz
ports-273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf.zip
x11/dwmblocks: Modular status bar for dwm
PR: 257680 Submitted by: echo@lethedata.com
Diffstat (limited to 'x11/dwmblocks')
-rw-r--r--x11/dwmblocks/Makefile45
-rw-r--r--x11/dwmblocks/distinfo3
-rw-r--r--x11/dwmblocks/files/patch-blocks.def.h15
-rw-r--r--x11/dwmblocks/pkg-descr6
4 files changed, 69 insertions, 0 deletions
diff --git a/x11/dwmblocks/Makefile b/x11/dwmblocks/Makefile
new file mode 100644
index 000000000000..2612011839da
--- /dev/null
+++ b/x11/dwmblocks/Makefile
@@ -0,0 +1,45 @@
+# x11/dwmblocks
+
+PORTNAME= dwmblocks
+DISTVERSION= g20201227
+CATEGORIES= x11
+
+MAINTAINER= echo@lethedata.com
+COMMENT= Modular status bar for dwm
+
+LICENSE= ISCL
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libX11.so:x11/libX11
+
+USES= xorg
+
+USE_GITHUB= yes
+GH_ACCOUNT= torrinfail
+GH_TAGNAME= 96cbb45
+
+USE_XORG= x11
+
+PLIST_FILES= bin/dwmblocks
+
+pre-everything::
+ @${ECHO_MSG} "You can build st with your own blocks.h using the BLK_CONF knob:"
+ @${ECHO_MSG} "make BLK_CONF=/path/to/st/blocks.h install clean"
+ @${ECHO_MSG} "Signal = 65 + Update Signal number"
+
+.if defined(BLK_CONF)
+post-extract:
+ @${ECHO_MSG} "creating symlink blocks.h from ${BLK_CONF}"
+ @${LN} -sf ${BLK_CONF} ${WRKSRC}/blocks.h
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -E \
+ -e "s|(LDFLAGS[[:space:]]*)= |\1= -L/usr/local/lib -I/usr/local/include |" \
+ -e "s|output|all|" \
+ ${WRKSRC}/Makefile
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dwmblocks
+
+.include <bsd.port.mk>
diff --git a/x11/dwmblocks/distinfo b/x11/dwmblocks/distinfo
new file mode 100644
index 000000000000..e8e47ffa9aad
--- /dev/null
+++ b/x11/dwmblocks/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1626356949
+SHA256 (torrinfail-dwmblocks-g20201227-96cbb45_GH0.tar.gz) = 48271ddb6a4fb0e40cb2f855923c3138e56179b4eec13c5181dfad884681137b
+SIZE (torrinfail-dwmblocks-g20201227-96cbb45_GH0.tar.gz) = 3626
diff --git a/x11/dwmblocks/files/patch-blocks.def.h b/x11/dwmblocks/files/patch-blocks.def.h
new file mode 100644
index 000000000000..9dfc15e5ecdd
--- /dev/null
+++ b/x11/dwmblocks/files/patch-blocks.def.h
@@ -0,0 +1,15 @@
+--- blocks.def.h.orig 2020-12-27 20:43:03 UTC
++++ blocks.def.h
+@@ -1,9 +1,8 @@
+ //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},
++ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
++ {"", "uname -n | sed 's/^/ /'", 0, 0},
++ {"", "date '+%F %R'", 60, 0},
+ };
+
+ //sets delimeter between status commands. NULL character ('\0') means no delimeter.
diff --git a/x11/dwmblocks/pkg-descr b/x11/dwmblocks/pkg-descr
new file mode 100644
index 000000000000..6da2d7660601
--- /dev/null
+++ b/x11/dwmblocks/pkg-descr
@@ -0,0 +1,6 @@
+Modular status bar for dwm written in c.
+
+The statusbar is made from text output from commandline programs.
+Blocks are added and removed by editing the blocks.h header file.
+
+WWW: https://github.com/torrinfail/dwmblocks/