def get_mvarg(size_pos, position='full'):
    """Take xrandrs size&pos and prepare it for wmctrl (MVARG) format
    
    MVARG: <G>,<X>,<Y>,<W>,<H>
      * <G> - gravity, 0 is default
    """
    allowed = ['left', 'right', 'top', 'bottom', 'full']
    if position not in allowed:
        raise ValueError(f'Position has to be one of {allowed}')
    size, x, y = size_pos.split('+')
    w, h = size.split('x')
    if position == 'left':
        w = int(w) // 2
    if position == 'right':
        w = int(w) // 2
        x = int(x) + w
    return f'0,{x},{y},{w},{h}'
