View | Details | Raw Unified | Return to bug 148268
Collapse All | Expand All

(-)scrotwm.new/Makefile (-18 / +3 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	scrotwm
8
PORTNAME=	scrotwm
9
PORTVERSION=	0.9.22
9
PORTVERSION=	0.9.24
10
CATEGORIES=	x11-wm
10
CATEGORIES=	x11-wm
11
MASTER_SITES=	http://scrotwm.org/snapshot/ \
11
MASTER_SITES=	http://scrotwm.org/snapshot/ \
12
		http://www.peereboom.us/scrotwm/snapshot/
12
		http://www.peereboom.us/scrotwm/snapshot/
Lines 15-23 Link Here
15
MAINTAINER=	aragon@phat.za.net
15
MAINTAINER=	aragon@phat.za.net
16
COMMENT=	A small, dynamic tiling window manager for X11
16
COMMENT=	A small, dynamic tiling window manager for X11
17
17
18
OPTIONS=	DMENU "Depend on x11/dmenu" On \
18
OPTIONS=	DMENU "Depend on x11/dmenu" Off \
19
		DMENU_BOTTOM "dmenu at screen bottom (instead of top)" Off \
19
		DMENU_BOTTOM "dmenu at screen bottom (instead of top)" Off
20
		CLOCKFORMAT "Configurable strftime(3) clock format" Off
21
20
22
.include <bsd.port.pre.mk>
21
.include <bsd.port.pre.mk>
23
22
Lines 33-41 Link Here
33
.if defined(WITH_DMENU_BOTTOM)
32
.if defined(WITH_DMENU_BOTTOM)
34
EXTRA_PATCHES+=	${FILESDIR}/spawn_menu_atbottom.patch
33
EXTRA_PATCHES+=	${FILESDIR}/spawn_menu_atbottom.patch
35
.endif
34
.endif
36
.if defined(WITH_CLOCKFORMAT)
37
EXTRA_PATCHES+=	${FILESDIR}/clock_format.patch
38
.endif
39
35
40
do-build:
36
do-build:
41
	${CC} ${CFLAGS} -I${X11BASE}/include \
37
	${CC} ${CFLAGS} -I${X11BASE}/include \
Lines 54-68 Link Here
54
post-patch:
50
post-patch:
55
	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/scrotwm.*
51
	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/scrotwm.*
56
52
57
post-install:
58
.if defined(WITH_CLOCKFORMAT)
59
	@${ECHO_MSG}
60
	@${ECHO_MSG} "CLOCK FORMAT"
61
	@${ECHO_MSG}
62
	@${ECHO_MSG} "To set the clock's format, add a clock_format directive"
63
	@${ECHO_MSG} "to your configuration file and set it to a format string"
64
	@${ECHO_MSG} "following strftime(3) convention."
65
	@${ECHO_MSG}
66
.endif
67
68
.include <bsd.port.post.mk>
53
.include <bsd.port.post.mk>
(-)scrotwm.new/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (scrotwm-0.9.22.tgz) = bc66c66d300b3176c119bfdae43b6a42
1
MD5 (scrotwm-0.9.24.tgz) = e7e0022b3166774351db3a29bf5f0909
2
SHA256 (scrotwm-0.9.22.tgz) = a3952d6a27f0c08dac05cb28226d70e611a8051cdc2735f04e7d64f122fb2943
2
SHA256 (scrotwm-0.9.24.tgz) = f592619f6053a47e28eace059647fed7ec4ac9848b00163637e6eb58a4bac6af
3
SIZE (scrotwm-0.9.22.tgz) = 54396
3
SIZE (scrotwm-0.9.24.tgz) = 54940
(-)scrotwm.new/files/clock_format.patch (-79 lines)
Lines 1-79 Link Here
1
--- scrotwm.c.orig	2009-10-24 16:21:19.000000000 +0200
2
+++ scrotwm.c	2009-10-24 16:58:55.000000000 +0200
3
@@ -193,6 +193,7 @@
4
 int			bar_height = 0;
5
 int			stack_enabled = 1;
6
 int			clock_enabled = 1;
7
+char			*clock_format = NULL;
8
 int			title_name_enabled = 0;
9
 int			title_class_enabled = 0;
10
 pid_t			bar_pid;
11
@@ -839,7 +840,7 @@
12
 	else {
13
 		time(&tmt);
14
 		localtime_r(&tmt, &tm);
15
-		strftime(s, sizeof s, "%a %b %d %R %Z %Y    ", &tm);
16
+		strftime(s, sizeof s, clock_format, &tm);
17
 	}
18
 
19
 	for (i = 0; i < ScreenCount(display); i++) {
20
@@ -851,7 +852,7 @@
21
 			if (stack_enabled)
22
 				stack = r->ws->cur_layout->name;
23
 
24
-			snprintf(loc, sizeof loc, "%d:%d %s   %s %s    %s",
25
+			snprintf(loc, sizeof loc, "%d:%d %s   %s    %s    %s",
26
 			    x++, r->ws->idx + 1, stack, s, bar_ext,
27
 			    bar_vertext);
28
 			bar_print(r, loc);
29
@@ -3293,10 +3294,11 @@
30
 #define SWM_CONF_FILE	"scrotwm.conf"
31
 
32
 enum	{ SWM_S_BAR_DELAY, SWM_S_BAR_ENABLED, SWM_S_STACK_ENABLED,
33
-	  SWM_S_CLOCK_ENABLED, SWM_S_CYCLE_EMPTY, SWM_S_CYCLE_VISIBLE,
34
-	  SWM_S_SS_ENABLED, SWM_S_TERM_WIDTH, SWM_S_TITLE_CLASS_ENABLED,
35
-	  SWM_S_TITLE_NAME_ENABLED, SWM_S_BAR_FONT, SWM_S_BAR_ACTION,
36
-	  SWM_S_SPAWN_TERM, SWM_S_SS_APP, SWM_S_DIALOG_RATIO };
37
+	  SWM_S_CLOCK_ENABLED, SWM_S_CLOCK_FORMAT, SWM_S_CYCLE_EMPTY,
38
+	  SWM_S_CYCLE_VISIBLE, SWM_S_SS_ENABLED, SWM_S_TERM_WIDTH,
39
+	  SWM_S_TITLE_CLASS_ENABLED, SWM_S_TITLE_NAME_ENABLED,
40
+	  SWM_S_BAR_FONT, SWM_S_BAR_ACTION, SWM_S_SPAWN_TERM,
41
+	  SWM_S_SS_APP, SWM_S_DIALOG_RATIO };
42
 
43
 int
44
 setconfvalue(char *selector, char *value, int flags)
45
@@ -3314,6 +3316,12 @@
46
 	case SWM_S_CLOCK_ENABLED:
47
 		clock_enabled = atoi(value);
48
 		break;
49
+	case SWM_S_CLOCK_FORMAT:
50
+		if (clock_format != NULL)
51
+			free(clock_format);
52
+		if ((clock_format = strdup(value)) == NULL)
53
+			err(1, "setconfvalue: clock_format");
54
+		break;
55
 	case SWM_S_CYCLE_EMPTY:
56
 		cycle_empty = atoi(value);
57
 		break;
58
@@ -3407,6 +3415,7 @@
59
 	{ "bind",			setconfbinding,	0 },
60
 	{ "stack_enabled",		setconfvalue,	SWM_S_STACK_ENABLED },
61
 	{ "clock_enabled",		setconfvalue,	SWM_S_CLOCK_ENABLED },
62
+	{ "clock_format",		setconfvalue,	SWM_S_CLOCK_FORMAT },
63
 	{ "color_focus",		setconfcolor,	SWM_S_COLOR_FOCUS },
64
 	{ "color_unfocus",		setconfcolor,	SWM_S_COLOR_UNFOCUS },
65
 	{ "cycle_empty",		setconfvalue,	SWM_S_CYCLE_EMPTY },
66
@@ -4468,6 +4477,13 @@
67
 	if (cfile)
68
 		conf_load(cfile);
69
 
70
+	if (clock_format == NULL) {
71
+		if ((clock_format = strdup("%a %b %d %R %Z %Y"))
72
+		    == NULL) {
73
+			errx(1, "strdup");
74
+		}
75
+	}
76
+
77
 	/* setup all bars */
78
 	for (i = 0; i < ScreenCount(display); i++)
79
 		TAILQ_FOREACH(r, &screens[i].rl, entry) {

Return to bug 148268