#!/bin/sh # # Without argument, switch to the next-to-last window we were working # on (i.e the third window backwards in history). Argument determines # how far back in history we should go. if [ -n "$1" ] then winnumber=$1 else winnumber=3 fi window=`ratpoison -c "windows %l %n" | sort -n | tail -$winnumber| head -1 | cut -d " " -f 2` ratpoison -c "select $window"