#! /bin/bash # function to get the window id function get_window_id() { window_id=$(wmctrl -l | grep "$1" | tail -1 | cut -f1 -d" ") } get_window_id "fsa" wmctrl -i -r "$window_id" -e 0,50,50,800,480 get_window_id "navit" wmctrl -i -r "$window_id" -e 0,50,22,800,480 wmctrl -a "fsa"