implement docking/portable switch software
The software will start on boot and will
- detect if current hardware can be docked/portable (gpi2, piboy or rg353x), if not just exit
- detect current mode
- if a switch has occurred (portable to docked or docked to portable), then do this:
- change theme as requested (go2/next) if theme was not customized (see piboy docking software)
- change audio sink output
- force external or internal display off
- disable internal joystick if docked (i.e for gpi2: echo "1-1.3:1.0" > /sys/bus/usb/drivers/xpad/unbind)
For each hardware, some functions helper must exist:
- get current docking status (from gpio, kernel flag, drm)
- disable internal screen
- disable external video connector
- set internal audio speaker
- set external audio output