Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Aug 2021 12:18:12 GMT
From:      Neel Chauhan <nc@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 273084ac8bef - main - x11/dwmblocks: Modular status bar for dwm
Message-ID:  <202108081218.178CICiZ007173@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf

commit 273084ac8bef3aa7b9e6f57a3ed473b17b3a1acf
Author:     Neel Chauhan <nc@FreeBSD.org>
AuthorDate: 2021-08-08 12:17:06 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-08-08 12:18:02 +0000

    x11/dwmblocks: Modular status bar for dwm
    
    PR:             257680
    Submitted by:   echo@lethedata.com
---
 x11/Makefile                           |  1 +
 x11/dwmblocks/Makefile                 | 45 ++++++++++++++++++++++++++++++++++
 x11/dwmblocks/distinfo                 |  3 +++
 x11/dwmblocks/files/patch-blocks.def.h | 15 ++++++++++++
 x11/dwmblocks/pkg-descr                |  6 +++++
 5 files changed, 70 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 880559ceb7c6..4f247e0f23a8 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -52,6 +52,7 @@
     SUBDIR += docker-tray
     SUBDIR += dsbautostart
     SUBDIR += dsbxinput
+    SUBDIR += dwmblocks
     SUBDIR += dxpc
     SUBDIR += dzen2
     SUBDIR += eaglemode
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108081218.178CICiZ007173>