diff -r 682cd3c12782 sys/src/cmd/rio/data.c --- a/sys/src/cmd/rio/data.c Fri Apr 22 03:41:06 2016 +0200 +++ b/sys/src/cmd/rio/data.c Fri Apr 22 21:29:16 2016 +0000 @@ -7,6 +7,7 @@ #include #include #include +#include #include "dat.h" #include "fns.h" @@ -175,30 +176,34 @@ void iconinit(void) { - background = allocimage(display, Rect(0,0,1,1), RGB24, 1, 0x777777FF); + themeinit(); + + background = allocimage(display, Rect(0,0,1,1), RGB24, 1, themeget("rio", "background", 0x777777FF)); /* greys are multiples of 0x11111100+0xFF, 14* being palest */ - cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xFFFFFFFF^reverse); - cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x999999FF^reverse); - cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF^reverse); - cols[HTEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x000000FF); + cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termback", 0xFFFFFFFF^reverse)); + cols[BORD] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termbord", 0x999999FF^reverse)); + cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termtext", 0x000000FF^reverse)); + cols[HTEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termhtext", 0x000000FF)); if(!reverse) { - cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF); - titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreygreen); - lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreygreen); + cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termhigh", 0xCCCCCCFF)); + titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "title", DGreygreen)); + lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "lighttitle", DPalegreygreen)); } else { - cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue); - titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPurpleblue); - lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x222222FF); + cols[HIGH] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "termhigh", DPurpleblue)); + titlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "title", DPurpleblue)); + lighttitlecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "lighttitle", 0x222222FF)); } - dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DMedblue); - lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DGreyblue); - paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreyblue); - paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse); - sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DRed); + dholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "hold", DMedblue)); + lightholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "lighthold", DGreyblue)); + paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "palehold", DPalegreyblue)); + paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "paletext", 0x666666FF^reverse)); + sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, themeget("rio", "size", DRed)); if(reverse == 0) holdcol = dholdcol; else holdcol = paleholdcol; + + themeend(); } diff -r 682cd3c12782 sys/src/cmd/rio/mkfile --- a/sys/src/cmd/rio/mkfile Fri Apr 22 03:41:06 2016 +0200 +++ b/sys/src/cmd/rio/mkfile Fri Apr 22 21:29:16 2016 +0000 @@ -24,7 +24,8 @@ syms $CC -aa $CFLAGS *.c >>syms