ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] ratpoison script to show all windows


From: Florian Cramer
Subject: [RP] ratpoison script to show all windows
Date: Sun Nov 16 13:25:10 2003
User-agent: Mutt/1.5.4i

Perhaps people might find the script below pleasurable/useful; it
creates a temporary split view of all open windows and restores the
previous window/frame layout when the user hits the return key.

-F



#!/bin/sh

# rpshowall
# ratpoison script to show all open windows 
# 2003 Florian Cramer <address@hidden>


# Save current frameset

framecount=`ratpoison -c windows | wc -l | sed -e "s/[ ]*//g"`
curframe=`ratpoison -c windows | grep "\*" | sed -e "s/^\([0-9]*\)\*.*/\1/"`
ratpoison -c "setenv tmp `ratpoison -c 'fdump'`"


# Create split view of all open windows

ratpoison -c only
i=2; 
while [ $i -le $framecount ]; do 
        if [ $i -le `echo $framecount/2 | bc` ] ; then
                ratpoison -c hsplit
        else
                ratpoison -c vsplit
        fi
        ratpoison -c focus
        ratpoison -c focus
        i=$[$i+1];
done


# Restore frameset

ratpoison -c "select $curframe"
echo -n "Restore window layout... "
read i
ratpoison -c "frestore `ratpoison -c 'getenv tmp'`"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]