Removed PLAN9BASE config.mk knob in favor of wmii9rc script. Still not an ideal solution.

This commit is contained in:
Kris Maglione 2007-03-03 09:42:06 -05:00
parent d1428fafd0
commit 356f676015
6 changed files with 19 additions and 10 deletions

View File

@ -9,7 +9,7 @@ SRC = area.c bar.c client.c column.c draw.c event.c frame.c fs.c \
geom.c key.c main.c mouse.c rule.c printevent.c util.c view.c
OBJ = ${SRC:.c=.o}
MAN1 = wmii wmiir wmiiwm wmiiloop
SCRIPTS = wmii wmiir wmiiloop
SCRIPTS = wmii wmiir wmiiloop wmii9rc
BIN = wmiiwm wmii9menu
all: options ${BIN}
@ -74,9 +74,7 @@ install: all
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@mkdir -p -m 0755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@cd rc; for i in *; do \
sed "s|CONFPREFIX|${CONFPREFIX}|g; \
s|PLAN9BASE|${PLAN9BASE}|g" \
$$i \
sed "s|CONFPREFIX|${CONFPREFIX}|g" $$i \
>${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
done

View File

@ -45,7 +45,7 @@ create_client(Window w, XWindowAttributes *wa) {
XSetWindowBorderWidth(blz.dpy, c->win, 0);
XAddToSaveSet(blz.dpy, c->win);
fwa.override_redirect = 1;
fwa.override_redirect = True;
fwa.background_pixmap = ParentRelative;
fwa.backing_store = Always;
fwa.event_mask =

View File

@ -9,7 +9,6 @@ PREFIX = /usr/local
CONFPREFIX = ${PREFIX}/etc
MANPREFIX = ${PREFIX}/share/man
AWKPATH = /usr/bin/awk
PLAN9BASE = $${PLAN9:-/usr/local/plan9}
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

View File

@ -1,4 +1,4 @@
#!PLAN9BASE/bin/rc
#!/usr/bin/env wmii9rc
# WMII Configuration
oldpath=$path

4
wmii
View File

@ -5,10 +5,8 @@ export WMII_CONFPATH="$HOME/.wmii-CONFVERSION:CONFPREFIX/wmii-CONFVERSION"
export WMII_NS_DIR="/tmp/ns.$USER.${DISPLAY%.0}"
export WMII_ADDRESS="unix!$WMII_NS_DIR/wmii"
if [ -x /usr/local/plan9/bin/rc ]; then
if wmii9rc; then
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which rc.wmii`
elif [ -x "$PLAN9/bin/rc" ]; then
WMIIRC="$PLAN9/bin/rc `PATH="$WMII_CONFPATH:$PATH" which rc.wmii`"
else
WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which wmiirc`
fi

14
wmii9rc Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
RC=""
for i in "$PLAN9" /usr/local/plan9 /usr/local/9 /opt/plan9 /opt/9 /usr/plan9 /usr/9; do
if [ -d "$i" -a -x "$i/bin/rc" ]; then
RC="$i/bin/rc"
break;
fi
done
if [ ! -n "$RC" ]; then
exit 1
elif [ "X$@" != "X" ]; then
$RC $@
fi