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>
This commit is contained in:
Dennis Herrmann 2009-07-01 19:06:38 +00:00
parent e0cfdb931d
commit 42a9d7305b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=236877
13 changed files with 325 additions and 0 deletions

View file

@ -103,6 +103,7 @@
SUBDIR += ratpoison
SUBDIR += sapphire
SUBDIR += sawfish
SUBDIR += scrotwm
SUBDIR += selectwm
SUBDIR += simple-ccsm
SUBDIR += skippy

72
x11-wm/scrotwm/Makefile Normal file
View file

@ -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>

3
x11-wm/scrotwm/distinfo Normal file
View file

@ -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

View file

@ -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);
}

View file

@ -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)

View file

@ -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);

14
x11-wm/scrotwm/pkg-descr Normal file
View file

@ -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

72
x11-wm/spectrwm/Makefile Normal file
View file

@ -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>

3
x11-wm/spectrwm/distinfo Normal file
View file

@ -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

View file

@ -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);
}

View file

@ -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)

View file

@ -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);

14
x11-wm/spectrwm/pkg-descr Normal file
View file

@ -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