diff options
author | rcyeske <rcyeske> | 2003-11-17 04:29:59 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2003-11-17 04:29:59 +0000 |
commit | 5c658d8011fd459418a94e3524df0a72e08cd11b (patch) | |
tree | 8fc5be287b68e5f20b9972557c5dac4e9254439d | |
parent | 1ca0874f1647ae5d49205715dd5e38a199e4ade9 (diff) | |
download | ratpoison-5c658d8011fd459418a94e3524df0a72e08cd11b.zip |
Added file. From Florian Cramer <cantsin@zedat.fu-berlin.de>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | contrib/rpshowall.sh | 36 |
2 files changed, 41 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2003-11-16 Ryan Yeske <rcyeske@vcn.bc.ca> + + * contrib/rpshowall.sh: Added file. From Florian Cramer + <cantsin@zedat.fu-berlin.de> + 2003-11-02 Thien-Thi Nguyen <ttn@glug.org> * AUTHORS: Add self. diff --git a/contrib/rpshowall.sh b/contrib/rpshowall.sh new file mode 100644 index 0000000..2465243 --- /dev/null +++ b/contrib/rpshowall.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# rpshowall +# ratpoison script to show all open windows +# 2003 Florian Cramer <cantsin@zedat.fu-berlin.de> + + +# 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'`" |