home / codeberg / blog / docs


rio customization

To customize rio, I recommend you to copy the sources so you won't break original rio:

mkdir rio
cp /sys/src/cmd/rio/* rio/

Rio folder contains a couple of .c and .h files, we will edit them to customize because rio is very minimal and not configurable without editing source code. First thing we can do is change window border width, just look up dat.h file and change one line:

Selborder = 2, /* border of selected window */ 

That line tells rio how much pixels should border be, also we have Unselborder but it's not that important because who even cares about unselect window border, I set it to 3 for example

Also you can change console colors, editing lines like:

cols[BACK] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xFFFFFFFF);
cols[TEXT] = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xCCCCCCFF);

If you wanna color that isn't b/w, replace CMAP8 to RGBA32

cols[BACK] = allocimage(display, Rect(0,0,1,1), RGBA32, 1, 0x123456FF);

To set wallpaper, look up this page