#!/bin/bash

h_offset=$1
v_offset=$2
v_vector=$3

dim=$(xdpyinfo | grep dimensions)
h_dim=${dim%%x*}
h_dim=${h_dim##* }
v_dim=${dim#*x}
v_dim=${v_dim%% *}

if [ -z "$h_offset" ]; then ((h_offset=h_dim/10)); fi
if [ -z "$v_offset" ]; then ((v_offset=v_dim/10)); fi
if [ -z "$v_vector" ]; then ((v_vector=v_dim/50)); fi

((width=h_dim-h_offset))
((height=v_dim-v_offset))
((x=(h_dim-width)/2))
((y=(v_dim-height)/2-v_vector))

echo "$h_dim|$v_dim"
echo $width
echo $height
echo $x
echo $y

