!/bin/bash
xrandr -s 0 --output DSI-1
xrandr -s 0 --output HDMI-1
xrandr --fb 1024x600 --output DSI-1 --mode 1024x600 --panning 0x0*
xrandr --output DSI-1 --primary --mode 1024x600 --pos 0x0 --output HDMI-1 --mode 1920x1080 --pos 1024x0
gst-launch-1.0 v4l2src device=/dev/v4l/by-id/usb-MACROSILICON_USB_Video-video-index0 ! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! xvimagesink &
sleep 1
value=xdotool search --onlyvisible --name gst-launch-1.0
/bin/bash -c "wmctrl -ir $value -b remove,maximized_vert,maximized_horz"
/bin/bash -c "xdotool windowmove $value 1024 0"
/bin/bash -c "wmctrl -ir $value -b toggle,fullscreen"