summaryrefslogtreecommitdiff
path: root/contrib/rpshowall.sh
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-11-18 05:06:35 +0000
committersabetts <sabetts>2003-11-18 05:06:35 +0000
commitcf7ad617d4ce46c6bac6ac28e5323ab53e3ef17b (patch)
tree93a685a928d7ac7ae2960bf7441415f597ff6090 /contrib/rpshowall.sh
parent5c658d8011fd459418a94e3524df0a72e08cd11b (diff)
downloadratpoison-cf7ad617d4ce46c6bac6ac28e5323ab53e3ef17b.zip
* contrib/rpshowall.sh: store ratpoison binary location in
RATPOISON env var. * src/ratpoison.h (FD_CLOEXEC): new define (set_close_on_exec): new prototype * src/main.c (ratpoison_longopts): add "interactive" option. (ratpoison_opts): likewise (print_help): print a help line for interactive option. (set_close_on_exec): new function (read_startup_files): call set_close_on_exec on file pointer (main): parse interactive command line option and pass it to send_command. * src/events.c (execute_remote_command): pass the interactive bit to command. * src/communications.c (send_command): send an interactive bit at the beginning of the message. Take an interactive argument. All callers updated. Prototype updated. * src/actions.c (cmd_source): call set_close_on_exec on file pointer.
Diffstat (limited to 'contrib/rpshowall.sh')
-rw-r--r--contrib/rpshowall.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/contrib/rpshowall.sh b/contrib/rpshowall.sh
index 2465243..b4d8570 100644
--- a/contrib/rpshowall.sh
+++ b/contrib/rpshowall.sh
@@ -4,33 +4,35 @@
# ratpoison script to show all open windows
# 2003 Florian Cramer <cantsin@zedat.fu-berlin.de>
-
+if [ -z $RATPOISON ]; then
+ RATPOISON=ratpoison
+fi
# 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'`"
+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
+$RATPOISON -c only
i=2;
while [ $i -le $framecount ]; do
if [ $i -le `echo $framecount/2 | bc` ] ; then
- ratpoison -c hsplit
+ $RATPOISON -c hsplit
else
- ratpoison -c vsplit
+ $RATPOISON -c vsplit
fi
- ratpoison -c focus
- ratpoison -c focus
+ $RATPOISON -c focus
+ $RATPOISON -c focus
i=$[$i+1];
done
# Restore frameset
-ratpoison -c "select $curframe"
+$RATPOISON -c "select $curframe"
echo -n "Restore window layout... "
read i
-ratpoison -c "frestore `ratpoison -c 'getenv tmp'`"
+$RATPOISON -c "frestore `$RATPOISON -c 'getenv tmp'`"