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

(-)scrotwm/Makefile (-8 / +4 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	scrotwm
8
PORTNAME=	scrotwm
9
PORTVERSION=	0.9.5
9
PORTVERSION=	0.9.19
10
CATEGORIES=	x11-wm
10
CATEGORIES=	x11-wm
11
MASTER_SITES=	http://www.peereboom.us/scrotwm/snapshot/ \
11
MASTER_SITES=	http://www.peereboom.us/scrotwm/snapshot/ \
12
		${MASTER_SITE_LOCAL}
12
		${MASTER_SITE_LOCAL}
Lines 17-23 Link Here
17
COMMENT=	A small, dynamic tiling window manager for X11
17
COMMENT=	A small, dynamic tiling window manager for X11
18
18
19
OPTIONS=	DMENU "Depend on x11/dmenu" On \
19
OPTIONS=	DMENU "Depend on x11/dmenu" On \
20
		DMENU_COLFIX "Fix inverted/select colour on dmenu" On \
21
		DMENU_BOTTOM "dmenu at screen bottom (instead of top)" Off \
20
		DMENU_BOTTOM "dmenu at screen bottom (instead of top)" Off \
22
		CLOCKFORMAT "Configurable strftime(3) clock format" Off
21
		CLOCKFORMAT "Configurable strftime(3) clock format" Off
23
22
Lines 27-40 Link Here
27
USE_XLIB=	yes
26
USE_XLIB=	yes
28
27
29
MAN1=		scrotwm.1
28
MAN1=		scrotwm.1
30
PLIST_FILES=	bin/scrotwm lib/swmhack.so etc/scrotwm.conf
29
PLIST_FILES=	bin/scrotwm lib/libswmhack.so etc/scrotwm.conf
31
30
32
.if defined(WITH_DMENU)
31
.if defined(WITH_DMENU)
33
RUN_DEPENDS=	dmenu:${PORTSDIR}/x11/dmenu
32
RUN_DEPENDS=	dmenu:${PORTSDIR}/x11/dmenu
34
.endif
33
.endif
35
.if defined(WITH_DMENU_COLFIX)
36
EXTRA_PATCHES+=	${FILESDIR}/spawn_menu_colourfix.patch
37
.endif
38
.if defined(WITH_DMENU_BOTTOM)
34
.if defined(WITH_DMENU_BOTTOM)
39
EXTRA_PATCHES+=	${FILESDIR}/spawn_menu_atbottom.patch
35
EXTRA_PATCHES+=	${FILESDIR}/spawn_menu_atbottom.patch
40
.endif
36
.endif
Lines 47-57 Link Here
47
		-I${WRKSRC}/linux -lutil -L${X11BASE}/lib -lX11 -lXrandr \
43
		-I${WRKSRC}/linux -lutil -L${X11BASE}/lib -lX11 -lXrandr \
48
		-o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
44
		-o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
49
	${CC} ${CFLAGS} -I${X11BASE}/include -shared -fPIC \
45
	${CC} ${CFLAGS} -I${X11BASE}/include -shared -fPIC \
50
		-o ${WRKSRC}/swmhack.so ${WRKSRC}/lib/swm_hack.c
46
		-o ${WRKSRC}/libswmhack.so ${WRKSRC}/lib/swm_hack.c
51
47
52
do-install:
48
do-install:
53
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
49
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
54
	${INSTALL_DATA} ${WRKSRC}/swmhack.so ${PREFIX}/lib
50
	${INSTALL_DATA} ${WRKSRC}/libswmhack.so ${PREFIX}/lib
55
	${INSTALL_DATA} ${WRKSRC}/scrotwm.conf ${PREFIX}/etc
51
	${INSTALL_DATA} ${WRKSRC}/scrotwm.conf ${PREFIX}/etc
56
	${INSTALL_MAN} ${WRKSRC}/scrotwm.1 ${PREFIX}/man/man1
52
	${INSTALL_MAN} ${WRKSRC}/scrotwm.1 ${PREFIX}/man/man1
57
53
(-)scrotwm/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (scrotwm-0.9.5.tgz) = d0ae2cdcaefa953627a250a183261670
1
MD5 (scrotwm-0.9.19.tgz) = a7af5038fac7e42e8d8cf5ed2d4a6da2
2
SHA256 (scrotwm-0.9.5.tgz) = 35a7e3ab805fc680459390e2e165f224268cec39bceb9679385c86a3054035ae
2
SHA256 (scrotwm-0.9.19.tgz) = ea150eac5fe71f6e5c6284bfb9b96d94f0c1e05b3998d124218de84f1c49aee1
3
SIZE (scrotwm-0.9.5.tgz) = 36134
3
SIZE (scrotwm-0.9.19.tgz) = 48706
(-)scrotwm/files/clock_format.patch (-40 / +68 lines)
Lines 1-51 Link Here
1
--- scrotwm.c.orig	2009-06-29 03:46:08.000000000 +0200
1
--- scrotwm.c.orig	2009-10-24 16:21:19.000000000 +0200
2
+++ scrotwm.c	2009-06-28 10:07:24.000000000 +0200
2
+++ scrotwm.c	2009-10-24 16:58:55.000000000 +0200
3
@@ -182,6 +182,7 @@
3
@@ -193,6 +193,7 @@
4
 int			bar_verbose = 1;
5
 int			bar_height = 0;
4
 int			bar_height = 0;
5
 int			stack_enabled = 1;
6
 int			clock_enabled = 1;
6
 int			clock_enabled = 1;
7
+char			clock_format[31] = "%a %b %d %R %Z %Y";
7
+char			*clock_format = NULL;
8
 int			title_name_enabled = 0;
9
 int			title_class_enabled = 0;
8
 pid_t			bar_pid;
10
 pid_t			bar_pid;
9
 GC			bar_gc;
11
@@ -839,7 +840,7 @@
10
 XGCValues		bar_gcv;
11
@@ -557,6 +558,7 @@
12
 
13
 /* conf file stuff */
14
 #define	SWM_CONF_WS	"\n= \t"
15
+#define	SWM_CONF_VAL_WS	"\n\t"
16
 #define SWM_CONF_FILE	"scrotwm.conf"
17
 int
18
 conf_load(char *filename)
19
@@ -594,7 +596,7 @@
20
 		if ((var = strsep(&cp, SWM_CONF_WS)) == NULL || cp == NULL)
21
 			break;
22
 		cp += (long)strspn(cp, SWM_CONF_WS);
23
-		if ((val = strsep(&cp, SWM_CONF_WS)) == NULL)
24
+		if ((val = strsep(&cp, SWM_CONF_VAL_WS)) == NULL)
25
 			break;
26
 
27
 		DNPRINTF(SWM_D_MISC, "conf_load: %s=%s\n",var ,val);
28
@@ -624,6 +626,8 @@
29
 		case 'c':
30
 			if (!strncmp(var, "clock_enabled", strlen("clock_enabled")))
31
 				clock_enabled = atoi(val);
32
+			else if (!strncmp(var, "clock_format", strlen("clock_format")))
33
+				strlcpy(clock_format, val, 31);
34
 			else if (!varmatch(var, "color_focus", &i))
35
 				setscreencolor(val, i, SWM_S_COLOR_FOCUS);
36
 			else if (!varmatch(var, "color_unfocus", &i))
37
@@ -779,12 +783,12 @@
38
 	else {
12
 	else {
39
 		time(&tmt);
13
 		time(&tmt);
40
 		localtime_r(&tmt, &tm);
14
 		localtime_r(&tmt, &tm);
41
-		strftime(s, sizeof s, "%a %b %d %R %Z %Y    ", &tm);
15
-		strftime(s, sizeof s, "%a %b %d %R %Z %Y    ", &tm);
42
+		strftime(s, sizeof s, clock_format, &tm);
16
+		strftime(s, sizeof s, clock_format, &tm);
43
 	}
17
 	}
18
 
44
 	for (i = 0; i < ScreenCount(display); i++) {
19
 	for (i = 0; i < ScreenCount(display); i++) {
45
 		x = 1;
20
@@ -851,7 +852,7 @@
46
 		TAILQ_FOREACH(r, &screens[i].rl, entry) {
21
 			if (stack_enabled)
47
-			snprintf(loc, sizeof loc, "%d:%d    %s%s    %s",
22
 				stack = r->ws->cur_layout->name;
48
+			snprintf(loc, sizeof loc, "%d:%d    %s    %s    %s",
23
 
49
 			    x++, r->ws->idx + 1, s, bar_ext, bar_vertext);
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);
50
 			bar_print(r, loc);
28
 			bar_print(r, loc);
51
 		}
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) {
(-)scrotwm/files/spawn_menu_atbottom.patch (-10 / +11 lines)
Lines 1-11 Link Here
1
--- scrotwm.c.orig	2009-06-29 03:46:08.000000000 +0200
1
--- scrotwm.c.orig	2009-10-24 07:10:36.000000000 +0200
2
+++ scrotwm.c	2009-06-28 10:07:24.000000000 +0200
2
+++ scrotwm.c	2009-10-24 07:11:10.000000000 +0200
3
@@ -199,7 +200,7 @@
3
@@ -2812,7 +2812,8 @@
4
 char			*spawn_lock[] = { "xlock", NULL };
4
 					" -nb $bar_color"
5
 char			*spawn_initscr[] = { "initscreen.sh", NULL };
5
 					" -nf $bar_font_color"
6
 char			*spawn_menu[] = { "dmenu_run", "-fn", NULL, "-nb", NULL,
6
 					" -sb $bar_border"
7
-			    "-nf", NULL, "-sb", NULL, "-sf", NULL, NULL };
7
-					" -sf $bar_color",	0);
8
+			    "-nf", NULL, "-sb", NULL, "-sf", NULL, "-b", NULL };
8
+					" -sf $bar_color"
9
+					" -b",	0);
10
 }
9
 
11
 
10
 #define SWM_MENU_FN	(2)
12
 /* key bindings */
11
 #define SWM_MENU_NB	(4)
(-)scrotwm/files/spawn_menu_colourfix.patch (-11 lines)
Lines 1-11 Link Here
1
--- scrotwm.c.orig	2009-06-29 03:46:08.000000000 +0200
2
+++ scrotwm.c	2009-06-28 10:07:24.000000000 +0200
3
@@ -1139,7 +1143,7 @@
4
 	spawn_menu[SWM_MENU_FN] = bar_fonts[bar_fidx];
5
 	spawn_menu[SWM_MENU_NB] = r->s->c[SWM_S_COLOR_BAR].name;
6
 	spawn_menu[SWM_MENU_NF] = r->s->c[SWM_S_COLOR_BAR_FONT].name;
7
-	spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_BORDER].name;
8
+	spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_FONT].name;
9
 	spawn_menu[SWM_MENU_SF] = r->s->c[SWM_S_COLOR_BAR].name;
10
 
11
 	spawn(r, args);

Return to bug 140127