src: add x11-settings encoder/decoder

Fixes bug #2