summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2003-11-17 04:29:59 +0000
committerrcyeske <rcyeske>2003-11-17 04:29:59 +0000
commit5c658d8011fd459418a94e3524df0a72e08cd11b (patch)
tree8fc5be287b68e5f20b9972557c5dac4e9254439d /contrib
parent1ca0874f1647ae5d49205715dd5e38a199e4ade9 (diff)
downloadratpoison-5c658d8011fd459418a94e3524df0a72e08cd11b.zip
Added file. From Florian Cramer <cantsin@zedat.fu-berlin.de>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/rpshowall.sh36
1 files changed, 36 insertions, 0 deletions
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'`"