summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-11-21 02:23:44 +0100
committercinap_lenrek <cinap_lenrek@centraldogma>2011-11-21 02:23:44 +0100
commitdc8d51903f27892c54445dd66992e0ebe8c63fca (patch)
treed05ba10b0ee3ef23087dc71d4d1bb750256eacd3
parent279ffaab222f1a941aeec9653810f0a7e8001d9c (diff)
parent0709558dd6fead54efdad4ca5e4eb0783ba4c9c5 (diff)
downloadplan9front-dc8d51903f27892c54445dd66992e0ebe8c63fca.tar.xz
merge
-rw-r--r--sys/man/1/rio7
-rw-r--r--sys/man/4/rio7
-rw-r--r--sys/src/cmd/rio/rio.c4
-rw-r--r--sys/src/cmd/rio/wind.c10
4 files changed, 20 insertions, 8 deletions
diff --git a/sys/man/1/rio b/sys/man/1/rio
index e0b297dcb..bf225bf13 100644
--- a/sys/man/1/rio
+++ b/sys/man/1/rio
@@ -13,6 +13,9 @@ rio, label, window, wloc \- window system
.B -s
]
[
+.B -b
+]
+[
.B -f
.I font
]
@@ -92,6 +95,10 @@ The
option initializes windows so that text scrolls;
the default is not to scroll.
The
+.B -b
+option reverses the normal color sheme for windows, painting white
+text on a black background.
+The
.I font
argument names a font used to display text, both in
.IR rio 's
diff --git a/sys/man/4/rio b/sys/man/4/rio
index a4e680757..efab905f9 100644
--- a/sys/man/4/rio
+++ b/sys/man/4/rio
@@ -8,9 +8,16 @@ rio \- window system files
.BI ' cmd '
]
[
+.B -k
+.BI ' kbdcmd '
+]
+[
.B -s
]
[
+.B -b
+]
+[
.B -f
.I font
]
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c
index 605fb409b..1051a1d2d 100644
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -46,6 +46,7 @@ Channel* initkbd(void);
char *fontname;
int mainpid;
+int reverse;
enum
{
@@ -134,6 +135,9 @@ threadmain(int argc, char *argv[])
kbdin = nil;
maxtab = 0;
ARGBEGIN{
+ case 'b':
+ reverse = ~0xFF;
+ break;
case 'f':
fontname = ARGF();
if(fontname == nil)
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index 92b63c177..527c23de6 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -21,9 +21,10 @@ enum
MinWater = 20000, /* room to leave available when reallocating */
};
+extern int reverse; /* there are no pastel paints in the dungeons and dragons world -- rob pike */
+
static int topped;
static int id;
-static int reverse;
static Image *cols[NCOL];
static Image *grey;
@@ -43,13 +44,6 @@ wmk(Image *i, Mousectl *mc, Channel *ck, Channel *cctl, int scrolling)
Rectangle r;
if(cols[0] == nil){
- /* there are no pastel paints in the dungeons and dragons world
- * - rob pike
- */
- reverse = 0;
- if(getenv("reverse") != nil)
- reverse = ~0xFF;
-
/* greys are multiples of 0x11111100+0xFF, 14* being palest */
grey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xEEEEEEFF^reverse);
darkgrey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse);