Just killing time while I wait for something else, so I thought I would share this, which is quite useful to open and layout multiple windows at once.

#requires: wmctrl, xdpyinfo
#wmtrcl syntax: wmctrl -r:{which window to move} -e 0,x off-set,y off-set,width,height
#windows=the number of windows to open
#per=the percent of the screen height each window should take up
#slp=how long to wait (in seconds) before opening the next window (float) which can be adjusted according to your computer speed
#dir=the directory you want to open in each window


screenwidth=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' | cut -d'x' -f1`
screenheight=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' | cut -d'x' -f2`

width=$(echo "$screenwidth / $windows - 6" | bc) 
height=$(echo "$screenheight*$per" | bc)


while [  $COUNTER -lt $windows ]; do
    rox "$dir"
    sleep 0.25
    wmctrl -r:ACTIVE: -e 0,"$xoffset",0,"$width","$height"
    sleep "$slp"

    xoffset=$(echo "$screenwidth / $windows * $COUNTER" | bc) 

exit 0



  1. !-check the code first to see if you approve, if you do then set it to executable
  2. set the parameters: number of windows, % screen height, path to the directory to open, and time to wait before opening each one.
  3. then put it in a good location, ex. in your pd-externals maybe, or ~/ somewhere
  4. send a link to it to your desktop...
  5. at a click it opens and lays out across the screen that many copies of the set directory.

I use this constantly to better align my brain, work, and focus.

p.s. Puppy Linux users seem to like it...as it's been viewed over there a 1,000+ times on their forum.

May you find it useful.

Note: one thing that works well...is save multiple copies of it with different "number of windows" parameters, ex. 2, 3, 4, then send links to all of them to your desktop. So you can align your current view to your current state of mind. :-)

Peace through Music.
Love through Sharing.