aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/scrotwm
diff options
context:
space:
mode:
authordhn <dhn@FreeBSD.org>2009-07-02 03:06:38 +0800
committerdhn <dhn@FreeBSD.org>2009-07-02 03:06:38 +0800
commitab55749aff11a1a57d4986211bbb16bab2482ddc (patch)
tree953f9aed9f06630c4915ef6df6fd684479dcbfdb /x11-wm/scrotwm
parentebdebcd97724aaac9e65f0469d9aa94565b4fe65 (diff)
downloadfreebsd-ports-gnome-ab55749aff11a1a57d4986211bbb16bab2482ddc.tar.gz
freebsd-ports-gnome-ab55749aff11a1a57d4986211bbb16bab2482ddc.tar.zst
freebsd-ports-gnome-ab55749aff11a1a57d4986211bbb16bab2482ddc.zip
Scrotwm is a small dynamic tiling window manager for X11. It tries to stay out
of the way so that valuable screen real estate can be used for much more important stuff. It has sane defaults and does not require one to learn a language to do any configuration. It was written by hackers for hackers and it strives to be small, compact and fast. It was largely inspired by xmonad and dwm. Both are fine products but suffer from things like: crazy-unportable-language-syndrome, silly defaults, asymmetrical window layout, "how hard can it be?" and good old NIH. Nevertheless dwm was a phenomenal resource and many good ideas and code was borrowed from it. On the other hand xmonad has great defaults, key bindings and xinerama support but is crippled by not being written in C. WWW: http://www.peereboom.us/scrotwm/html/scrotwm.html PR: ports/136214 Submitted by: Aragon Gouveia <aragon@phat.za.net>
Diffstat (limited to 'x11-wm/scrotwm')
-rw-r--r--x11-wm/scrotwm/Makefile72
-rw-r--r--x11-wm/scrotwm/distinfo3
-rw-r--r--x11-wm/scrotwm/files/clock_format.patch51
-rw-r--r--x11-wm/scrotwm/files/spawn_menu_atbottom.patch11
-rw-r--r--x11-wm/scrotwm/files/spawn_menu_colourfix.patch11
-rw-r--r--x11-wm/scrotwm/pkg-descr14
6 files changed, 162 insertions, 0 deletions
diff --git a/x11-wm/scrotwm/Makefile b/x11-wm/scrotwm/Makefile
new file mode 100644
index 000000000000..9393c29a0aaf
--- /dev/null
+++ b/x11-wm/scrotwm/Makefile
@@ -0,0 +1,72 @@
+# New ports collection makefile for: scrotwm
+# Date created: June 29, 2009
+# Whom: Aragon Gouveia <aragon@phat.za.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= scrotwm
+PORTVERSION= 0.9.5
+CATEGORIES= x11-wm
+MASTER_SITES= http://www.peereboom.us/scrotwm/snapshot/ \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= dhn
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= aragon@phat.za.net
+COMMENT= A small, dynamic tiling window manager for X11
+
+OPTIONS= DMENU "Depend on x11/dmenu" On \
+ DMENU_COLFIX "Fix inverted/select colour on dmenu" On \
+ DMENU_BOTTOM "dmenu at screen bottom (instead of top)" Off \
+ CLOCKFORMAT "Configurable strftime(3) clock format" Off
+
+.include <bsd.port.pre.mk>
+
+USE_XORG= x11 xproto xrandr
+USE_XLIB= yes
+
+MAN1= scrotwm.1
+PLIST_FILES= bin/scrotwm lib/swmhack.so etc/scrotwm.conf
+
+.if defined(WITH_DMENU)
+RUN_DEPENDS= dmenu:${PORTSDIR}/x11/dmenu
+.endif
+.if defined(WITH_DMENU_COLFIX)
+EXTRA_PATCHES+= ${FILESDIR}/spawn_menu_colourfix.patch
+.endif
+.if defined(WITH_DMENU_BOTTOM)
+EXTRA_PATCHES+= ${FILESDIR}/spawn_menu_atbottom.patch
+.endif
+.if defined(WITH_CLOCKFORMAT)
+EXTRA_PATCHES+= ${FILESDIR}/clock_format.patch
+.endif
+
+do-build:
+ ${CC} ${CFLAGS} -I${X11BASE}/include -DSWM_DEBUG \
+ -I${WRKSRC}/linux -lutil -L${X11BASE}/lib -lX11 -lXrandr \
+ -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
+ ${CC} ${CFLAGS} -I${X11BASE}/include -shared -fPIC \
+ -o ${WRKSRC}/swmhack.so ${WRKSRC}/lib/swm_hack.c
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/swmhack.so ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/scrotwm.conf ${PREFIX}/etc
+ ${INSTALL_MAN} ${WRKSRC}/scrotwm.1 ${PREFIX}/man/man1
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/scrotwm.*
+
+post-install:
+.if defined(WITH_CLOCKFORMAT)
+ @${ECHO_MSG}
+ @${ECHO_MSG} "CLOCK FORMAT"
+ @${ECHO_MSG}
+ @${ECHO_MSG} "To set the clock's format, add a clock_format directive"
+ @${ECHO_MSG} "to your configuration file and set it to a format string"
+ @${ECHO_MSG} "following strftime(3) convention."
+ @${ECHO_MSG}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/x11-wm/scrotwm/distinfo b/x11-wm/scrotwm/distinfo
new file mode 100644
index 000000000000..0edb8e12ed05
--- /dev/null
+++ b/x11-wm/scrotwm/distinfo
@@ -0,0 +1,3 @@
+MD5 (scrotwm-0.9.5.tgz) = d0ae2cdcaefa953627a250a183261670
+SHA256 (scrotwm-0.9.5.tgz) = 35a7e3ab805fc680459390e2e165f224268cec39bceb9679385c86a3054035ae
+SIZE (scrotwm-0.9.5.tgz) = 36134
diff --git a/x11-wm/scrotwm/files/clock_format.patch b/x11-wm/scrotwm/files/clock_format.patch
new file mode 100644
index 000000000000..b42c5c463061
--- /dev/null
+++ b/x11-wm/scrotwm/files/clock_format.patch
@@ -0,0 +1,51 @@
+--- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200
++++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200
+@@ -182,6 +182,7 @@
+ int bar_verbose = 1;
+ int bar_height = 0;
+ int clock_enabled = 1;
++char clock_format[31] = "%a %b %d %R %Z %Y";
+ pid_t bar_pid;
+ GC bar_gc;
+ XGCValues bar_gcv;
+@@ -557,6 +558,7 @@
+
+ /* conf file stuff */
+ #define SWM_CONF_WS "\n= \t"
++#define SWM_CONF_VAL_WS "\n\t"
+ #define SWM_CONF_FILE "scrotwm.conf"
+ int
+ conf_load(char *filename)
+@@ -594,7 +596,7 @@
+ if ((var = strsep(&cp, SWM_CONF_WS)) == NULL || cp == NULL)
+ break;
+ cp += (long)strspn(cp, SWM_CONF_WS);
+- if ((val = strsep(&cp, SWM_CONF_WS)) == NULL)
++ if ((val = strsep(&cp, SWM_CONF_VAL_WS)) == NULL)
+ break;
+
+ DNPRINTF(SWM_D_MISC, "conf_load: %s=%s\n",var ,val);
+@@ -624,6 +626,8 @@
+ case 'c':
+ if (!strncmp(var, "clock_enabled", strlen("clock_enabled")))
+ clock_enabled = atoi(val);
++ else if (!strncmp(var, "clock_format", strlen("clock_format")))
++ strlcpy(clock_format, val, 31);
+ else if (!varmatch(var, "color_focus", &i))
+ setscreencolor(val, i, SWM_S_COLOR_FOCUS);
+ else if (!varmatch(var, "color_unfocus", &i))
+@@ -779,12 +783,12 @@
+ else {
+ time(&tmt);
+ localtime_r(&tmt, &tm);
+- strftime(s, sizeof s, "%a %b %d %R %Z %Y ", &tm);
++ strftime(s, sizeof s, clock_format, &tm);
+ }
+ for (i = 0; i < ScreenCount(display); i++) {
+ x = 1;
+ TAILQ_FOREACH(r, &screens[i].rl, entry) {
+- snprintf(loc, sizeof loc, "%d:%d %s%s %s",
++ snprintf(loc, sizeof loc, "%d:%d %s %s %s",
+ x++, r->ws->idx + 1, s, bar_ext, bar_vertext);
+ bar_print(r, loc);
+ }
diff --git a/x11-wm/scrotwm/files/spawn_menu_atbottom.patch b/x11-wm/scrotwm/files/spawn_menu_atbottom.patch
new file mode 100644
index 000000000000..0a0b3dba412b
--- /dev/null
+++ b/x11-wm/scrotwm/files/spawn_menu_atbottom.patch
@@ -0,0 +1,11 @@
+--- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200
++++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200
+@@ -199,7 +200,7 @@
+ char *spawn_lock[] = { "xlock", NULL };
+ char *spawn_initscr[] = { "initscreen.sh", NULL };
+ char *spawn_menu[] = { "dmenu_run", "-fn", NULL, "-nb", NULL,
+- "-nf", NULL, "-sb", NULL, "-sf", NULL, NULL };
++ "-nf", NULL, "-sb", NULL, "-sf", NULL, "-b", NULL };
+
+ #define SWM_MENU_FN (2)
+ #define SWM_MENU_NB (4)
diff --git a/x11-wm/scrotwm/files/spawn_menu_colourfix.patch b/x11-wm/scrotwm/files/spawn_menu_colourfix.patch
new file mode 100644
index 000000000000..88a8a2f2677d
--- /dev/null
+++ b/x11-wm/scrotwm/files/spawn_menu_colourfix.patch
@@ -0,0 +1,11 @@
+--- scrotwm.c.orig 2009-06-29 03:46:08.000000000 +0200
++++ scrotwm.c 2009-06-28 10:07:24.000000000 +0200
+@@ -1139,7 +1143,7 @@
+ spawn_menu[SWM_MENU_FN] = bar_fonts[bar_fidx];
+ spawn_menu[SWM_MENU_NB] = r->s->c[SWM_S_COLOR_BAR].name;
+ spawn_menu[SWM_MENU_NF] = r->s->c[SWM_S_COLOR_BAR_FONT].name;
+- spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_BORDER].name;
++ spawn_menu[SWM_MENU_SB] = r->s->c[SWM_S_COLOR_BAR_FONT].name;
+ spawn_menu[SWM_MENU_SF] = r->s->c[SWM_S_COLOR_BAR].name;
+
+ spawn(r, args);
diff --git a/x11-wm/scrotwm/pkg-descr b/x11-wm/scrotwm/pkg-descr
new file mode 100644
index 000000000000..57ba33f2612b
--- /dev/null
+++ b/x11-wm/scrotwm/pkg-descr
@@ -0,0 +1,14 @@
+Scrotwm is a small dynamic tiling window manager for X11. It tries to stay out
+of the way so that valuable screen real estate can be used for much more
+important stuff. It has sane defaults and does not require one to learn a
+language to do any configuration. It was written by hackers for hackers and it
+strives to be small, compact and fast.
+
+It was largely inspired by xmonad and dwm. Both are fine products but suffer
+from things like: crazy-unportable-language-syndrome, silly defaults,
+asymmetrical window layout, "how hard can it be?" and good old NIH.
+Nevertheless dwm was a phenomenal resource and many good ideas and code was
+borrowed from it. On the other hand xmonad has great defaults, key bindings
+and xinerama support but is crippled by not being written in C.
+
+WWW: http://www.peereboom.us/scrotwm/html/scrotwm.html