Seguindo o conselho da AFH e com base no link e link eu vim com este script que é um pouco complicado porque a minha configuração de 3 telas não é horizontal e primário é de resolução diferente.
#!/bin/bash
# rsizes the window to full height and 50% width and moves into upper right corner
function getActiveWindowID
{
activeWinID=$(xdotool getactivewindow )
echo $activeWinID
}
function getActiveWindowHorizontalPosition
{
activeWinID=$(getActiveWindowID)
xPosLine=$(xwininfo -id $activeWinID | grep "Absolute upper-left X")
xPos=${xPosLine:25}
echo $xPos
}
function getActiveWindowVerticalPosition
{
activeWinID=$(getActiveWindowID)
yPosLine=$(xwininfo -id $activeWinID | grep "Absolute upper-left Y")
yPos=${yPosLine:25}
echo $yPos
}
function getActiveWindowWidth
{
activeWinID=$(getActiveWindowID)
xWidthLine=$(xwininfo -id $activeWinID | grep "Width")
xWidth=${xWidthLine:8}
echo $xWidth
}
function getActiveWindowHeight
{
activeWinID=$(getActiveWindowID)
xHeightLine=$(xwininfo -id $activeWinID | grep "Height")
xHeight=${xHeightLine:8}
echo $xHeight
}
function getActiveWindowCurrentMonitorHorizontal
{
activeWinID=$(getActiveWindowID)
xPos=$(getActiveWindowHorizontalPosition)
yPos=$(getActiveWindowVerticalPosition)
if [ $xPos -ge 1920 ] || [ $yPos -le 900 ]; then
monitorwidth=1440
echo $monitorwidth
else
monitorwidth=1920
echo $monitorwidth
fi
}
function getActiveWindowCurrentMonitorVertical
{
activeWinID=$(getActiveWindowID)
xPos=$(getActiveWindowHorizontalPosition)
yPos=$(getActiveWindowVerticalPosition)
if [ $xPos -ge 1920 ] || [ $yPos -le 900 ]; then
monitorheight=873
echo $monitorheight
else
monitorheight=1054
echo $monitorheight
fi
}
function getActiveScreenDistHorizontal
{
activeWinID=$(getActiveWindowID)
xPos=$(getActiveWindowHorizontalPosition)
yPos=$(getActiveWindowVerticalPosition)
if [ $xPos -ge 1920 ]; then
activescreendisthorizontal=1920
echo $activescreendisthorizontal
else
if [ $yPos -le 900 ]; then
activescreendisthorizontal=480
echo $activescreendisthorizontal
else
activescreendisthorizontal=0
echo $activescreendisthorizontal
fi
fi
}
function getActiveScreenDistVertical
{
activeWinID=$(getActiveWindowID)
xPos=$(getActiveWindowHorizontalPosition)
yPos=$(getActiveWindowVerticalPosition)
if [ $xPos -ge 1920 ]; then
activescreendistvertical=438
echo $activescreendisvertical
else
if [ $yPos -le 900 ]; then
activescreendistvertical=0
echo $activescreendistvertical
else
activescreendistvertical=900
echo $activescreendistvertical
fi
fi
}
#define MARGINS IN PIXELS
TOPMARGIN=0
RIGHTMARGIN=0
LEFTMARGIN=0
BOTTOMMARGIN=0
# get width of screen and height of screen
SCREEN_WIDTH=$(getActiveWindowCurrentMonitorHorizontal)
SCREEN_HEIGHT=$(getActiveWindowCurrentMonitorVertical)
xPos=$(getActiveWindowHorizontalPosition)
yPos=$(getActiveWindowVerticalPosition)
AVAILABLE_WIDTH=$(( $SCREEN_WIDTH - $RIGHTMARGIN -$LEFTMARGIN))
AVAILABLE_HEIGHT=$(( $SCREEN_HEIGHT - $TOPMARGIN - $BOTTOMMARGIN))
# new width and height
W=$(( $AVAILABLE_WIDTH / 2))
H=$(( $AVAILABLE_HEIGHT))
# Available coordinates
activescreendisthorizontal=$(getActiveScreenDistHorizontal)
activescreendistvertical=$(getActiveScreenDistVertical)
XLEFT=$(($activescreendisthorizontal+$LEFTMARGIN))
XRIGHT=$(($XLEFT+$LEFTMARGIN+$W ))
YTOP=$(($activescreendistvertical+$TOPMARGIN))
YBOTTOM=$(( $TOPMARGIN+$H ))
# Actual new coordinates
X=$XRIGHT
Y=$YTOP
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r
:ACTIVE: -e 10,$X,$Y,$W,$H