From 6d2635d5badb1825d766f16b0ad43f45f84ca495 Mon Sep 17 00:00:00 2001 From: Matthew Veety Date: Mon, 25 Apr 2016 17:49:31 -0400 Subject: [PATCH] made abaco's gui respect $font and made readweb respect most installations --- rc/bin/readweb | 15 ++++++++++----- sys/src/cmd/abaco/main.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/rc/bin/readweb b/rc/bin/readweb index 9290fd62e..93d4debe8 100755 --- a/rc/bin/readweb +++ b/rc/bin/readweb @@ -1,10 +1,15 @@ #!/bin/rc # start abaco and its prerequisites -rfork n - -# outside && bind /net.alt /net - +rfork ne +if(~ $#1 0){ + rimport '$cpu' /net +} +if not { + rimport $1 /net + shift +} webfs webcookies -echo useragent netscape 1.0 >/mnt/web/ctl +# probably not needed +# echo useragent netscape 1.0 >/mnt/web/ctl exec /$cputype/bin/abaco $* diff --git a/sys/src/cmd/abaco/main.c b/sys/src/cmd/abaco/main.c index b190e9f02..bd22eff6c 100644 --- a/sys/src/cmd/abaco/main.c +++ b/sys/src/cmd/abaco/main.c @@ -50,7 +50,7 @@ derror(Display *, char *s) static void usage(void) { - fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [url...]\n", + fprint(2, "usage: %s [-c ncol] [-m mtpt] [-t charset] [-f font] [url...]\n", argv0); exits("usage"); } @@ -61,6 +61,7 @@ threadmain(int argc, char *argv[]) Column *c; char buf[256]; int i, ncol; + char *tfnt = nil; rfork(RFENVG|RFNAMEG); @@ -80,6 +81,8 @@ threadmain(int argc, char *argv[]) case 't': charset = EARGF(usage()); break; + case 'f': + tfnt = EARGF(usage()); default: usage(); break; @@ -92,6 +95,12 @@ threadmain(int argc, char *argv[]) snarffd = open("/dev/snarf", OREAD|OCEXEC); + if(tfnt == nil){ + tfnt = getenv("font"); + if(tfnt != nil) + fontnames[0] = tfnt; + } + if(initdraw(derror, fontnames[0], "abaco") < 0) sysfatal("can't open display: %r"); memimageinit();