diff --git a/alternative_wmiircs/plan9port/wmiirc b/alternative_wmiircs/plan9port/wmiirc index 5a804122..e6430c04 100755 --- a/alternative_wmiircs/plan9port/wmiirc +++ b/alternative_wmiircs/plan9port/wmiirc @@ -1,4 +1,4 @@ -#!/usr/bin/env wmii9rc +#!/usr/bin/env rc cd scriptname=$0 oldpath=$path; path=($PLAN9/bin $path) diff --git a/cmd/Makefile b/cmd/Makefile index ff64780e..f1def848 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -10,7 +10,6 @@ TARG = wihack \ wmii.rc \ wmii.sh \ wmii9menu \ - wmii9rc \ wmiir OFILES = util.o diff --git a/cmd/wmii9rc.sh b/cmd/wmii9rc.sh deleted file mode 100644 index fbc49c64..00000000 --- a/cmd/wmii9rc.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -f -RC="" -IFS=: -for i in "$PLAN9" `echo "@P9PATHS@"`; do - if [ -d "$i" -a -x "$i/bin/rc" ]; then - export PLAN9="$i" - RC="$i/bin/rc" - break; - fi -done - -if [ -z "$RC" ]; then - exit 1 -fi - -if [ ! -x "$PLAN9/bin/read" ]; then - echo 1>&2 $0: Found rc, but not read'(1)'. You probably have an out-of-date 9base installed. -fi - -if [ -n "$1" ]; then - exec "$RC" "$@" -else - true -fi diff --git a/config.mk b/config.mk index db8d5b5e..eefa07eb 100644 --- a/config.mk +++ b/config.mk @@ -10,9 +10,11 @@ PREFIX = /usr/local INCLUDE = $(PREFIX)/include # Includes and libs -INCPATH = .:$(ROOT)/include:$(INCLUDE):/usr/include +INCLUDES = -I. -I$(ROOT)/include -I$(INCLUDE) -I/usr/include LIBS = -L$(ROOT)/lib -L/usr/lib +TERMINAL = xterm + # Flags include $(ROOT)/mk/gcc.mk CFLAGS += $(DEBUGCFLAGS) -O0 @@ -27,8 +29,6 @@ LD = cc # Archiver AR = ar crs -AWKPATH = $$(which awk) -P9PATHS = ${PLAN9}:"'$${HOME}/plan9'":/usr/local/plan9:/usr/local/9:/opt/plan9:/opt/9:/usr/plan9:/usr/9 # Your make shell. By default, the first found of /bin/dash, /bin/ksh, # /bin/sh. Except with bsdmake, which assumes /bin/sh is sane. bash and zsh # are painfully slow, and should be avoided. diff --git a/man/wmii.1 b/man/wmii.1 index c3e7ed54..2049c446 100644 --- a/man/wmii.1 +++ b/man/wmii.1 @@ -174,7 +174,7 @@ An action is a shell script in the default setup, but it can actually be any executable file. It is executed usually by selecting it from the actions menu. You can customize an action by copying it from the global action directory -\&'/home/kris/wmiiinst/etc/wmii\-3.5' to '\fB$HOME\fR/.wmii\-3.5' and then +\&'@CONFPREFIX@/wmii\-3.5' to '\fB$HOME\fR/.wmii\-3.5' and then editing the copy to fit your needs. Of course you can also create your own actions there; make sure that they are executable. @@ -227,7 +227,7 @@ tab(^); ll. Mod\-Shift\-c^\fBKill\fR the selected client Mod\-p \fI\fR^\fBExecute\fR \fI\fR Mod\-a \fI\fR^\fBExecute\fR the named | `Execute` | Mod-a | `Execute` the named /dev/null @@ -61,7 +67,7 @@ all: chmod 0755 $@ .man1.1: echo TXT2TAGS $(BASE)$< - txt2tags -o- $< | $(FILTER) >$@ + txt2tags -o- $< >$@ .out.install: echo INSTALL $$($(CLEANNAME) $(BASE)$*) @@ -100,7 +106,7 @@ all: man=1; \ path="$(MAN)/man$$man/$*.$$man"; \ echo INSTALL man $$($(CLEANNAME) "$(BASE)/$*($$man)"); \ - cp "$<" $(DESTDIR)"$$path"; \ + $(FILTER) <"$<" >$(DESTDIR)"$$path"; \ chmod 0644 $(DESTDIR)"$$path" .1.uninstall: echo UNINSTALL man $$($(CLEANNAME) $*'(1)') diff --git a/mk/wmii.mk b/mk/wmii.mk index 8fd43e03..9c941dc6 100644 --- a/mk/wmii.mk +++ b/mk/wmii.mk @@ -10,9 +10,8 @@ CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \ '-DCONFVERSION=\"$(CONFVERSION)\"' '-DCONFPREFIX=\"$(ETC)\"' FILTER = sed "s|@CONFPREFIX@|$(ETC)|g; \ s|@CONFVERSION@|$(CONFVERSION)|g; \ - s|@P9PATHS@|$(P9PATHS)|g; \ s|@DOCDIR@|$(DOC)|g; \ s|@LIBDIR@|$(LIBDIR)|g; \ s|@BINSH@|$(BINSH)|g; \ - s|@AWKPATH@|$(AWKPATH)|g" + s|@TERMINAL@|$(TERMINAL)|g;" diff --git a/rc/welcome.sh b/rc/welcome.sh index 161f6e45..d3f9be47 100644 --- a/rc/welcome.sh +++ b/rc/welcome.sh @@ -13,7 +13,7 @@ configuration variable which contains the Alt key by default. Let's go! -- Start two xterms by pressing M-Return twice. +- Start two @TERMINAL@s by pressing M-Return twice. - Switch between the three windows: M-j, M-k, M-h, M-l If you prefer to use the mouse, then just move the pointer to diff --git a/rc/wmiirc.sh b/rc/wmiirc.sh index aeea73c8..5c4583bd 100644 --- a/rc/wmiirc.sh +++ b/rc/wmiirc.sh @@ -22,7 +22,7 @@ WMII_BACKGROUND='#333333' WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS) -WMII_TERM="xterm" +WMII_TERM="@TERMINAL@" # Menu history hist="${WMII_CONFPATH%%:*}/history" diff --git a/util/compile b/util/compile index 950de87f..01580610 100755 --- a/util/compile +++ b/util/compile @@ -1,5 +1,8 @@ #!/bin/sh -f +CC=$1 +CFLAGS=$2; shift 2 + outfile="$1"; shift bin="$(echo $0 | sed 's,/[^/]*$,,')" diff --git a/util/link b/util/link index 7c11fc4a..5c6fc94c 100755 --- a/util/link +++ b/util/link @@ -1,5 +1,8 @@ #!/bin/sh -f +LD=$1 +LDFLAGS=$2; shift 2 + outfile="$1"; shift bin="$(echo $0 | sed 's,/[^/]*$,,')"