From 9cb1a3d51b8cba35ef443c64b5b1d99fa8d33ae6 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 16 Mar 2006 00:33:34 +0000 Subject: remove tabs and trailing whitespace. --- contrib/clickframe.pl | 33 ++++++++-------- contrib/genrpbindings | 102 +++++++++++++++++++++++++------------------------- contrib/nogaps.el | 4 +- contrib/ratpoison.el | 20 +++++----- contrib/rpshowall.sh | 56 +++++++++++++-------------- contrib/rpws | 35 +++++++++-------- contrib/unrat.c | 50 ++++++++++++------------- 7 files changed, 149 insertions(+), 151 deletions(-) (limited to 'contrib') diff --git a/contrib/clickframe.pl b/contrib/clickframe.pl index 474a9a0..e4836b9 100644 --- a/contrib/clickframe.pl +++ b/contrib/clickframe.pl @@ -35,15 +35,15 @@ foreach $frame (@framelist) { ($num,$left,$top,$width,$height,$win,$access) = split(/ /,$frame); if ($x_loc > $left && $x_loc < $left + $width && $y_loc > $top && $y_loc < $top + $height) { # Tell ratpoison to switch to the frame - print "User clicked in frame $num\n"; - system ("$ratpoison_bin -c \"fselect $num\""); + print "User clicked in frame $num\n"; + system ("$ratpoison_bin -c \"fselect $num\""); } } __END__ ---- xbindkeys.c~ 2003-04-06 08:43:27.000000000 -0700 -+++ xbindkeys.c 2003-09-24 11:46:20.000000000 -0700 +--- xbindkeys.c~ 2003-04-06 08:43:27.000000000 -0700 ++++ xbindkeys.c 2003-09-24 11:46:20.000000000 -0700 @@ -143,7 +143,15 @@ @@ -61,21 +61,20 @@ __END__ static void @@ -240,6 +248,8 @@ - | Button1Mask | Button2Mask | Button3Mask - | Button4Mask | Button5Mask); + | Button1Mask | Button2Mask | Button3Mask + | Button4Mask | Button5Mask); -+ add_button_env (e.xbutton.x, e.xbutton.y); ++ add_button_env (e.xbutton.x, e.xbutton.y); + - for (i = 0; i < nb_keys; i++) - { - if (keys[i].type == BUTTON && keys[i].event_type == PRESS) + for (i = 0; i < nb_keys; i++) + { + if (keys[i].type == BUTTON && keys[i].event_type == PRESS) @@ -266,6 +276,8 @@ - | Button1Mask | Button2Mask | Button3Mask - | Button4Mask | Button5Mask); + | Button1Mask | Button2Mask | Button3Mask + | Button4Mask | Button5Mask); -+ add_button_env (e.xbutton.x, e.xbutton.y); ++ add_button_env (e.xbutton.x, e.xbutton.y); + - for (i = 0; i < nb_keys; i++) - { - if (keys[i].type == BUTTON && keys[i].event_type == RELEASE) - + for (i = 0; i < nb_keys; i++) + { + if (keys[i].type == BUTTON && keys[i].event_type == RELEASE) diff --git a/contrib/genrpbindings b/contrib/genrpbindings index cf90b06..dffa99c 100755 --- a/contrib/genrpbindings +++ b/contrib/genrpbindings @@ -73,16 +73,16 @@ print ELISP < (point-max) 1) - (- (point-max) 1) - (point-max))))) + (- (point-max) 1) + (point-max))))) PREAMBLE # RUBY preamble @@ -113,28 +113,28 @@ print COMMONLISP <) { if (m!/\*\@begin !) { - while () - { - last if (m!/\*\@end !); - if (/\s*add_command\s*\(\"([^\"]+)\",\s*[^\"]+,\s*([0-9]+),\s*[0-9]+,\s*([0-9]+)/) { - my $name = $1; - my $numargs = $2; - my $optargs = $3; - - # Skip the arguments - for (my $i=0; $i<$numargs; $i++) { - ; - } - - $nbindings++; - print PERL "sub $name { return command (\"$name\", \@_); }"; - print ELISP "(defun-ratpoison $name)"; - print COMMONLISP "(defun-ratpoison $name)"; - print RUBY " def $name (*args)"; - print RUBY " return command (\"$name\", args)"; - print RUBY " end"; - print RUBY " module_function :$name\n"; - print PYTHON "def rp_$name( *args ): return rp_command ( '$name ' + ' '.join( args ) )"; - } - } + while () + { + last if (m!/\*\@end !); + if (/\s*add_command\s*\(\"([^\"]+)\",\s*[^\"]+,\s*([0-9]+),\s*[0-9]+,\s*([0-9]+)/) { + my $name = $1; + my $numargs = $2; + my $optargs = $3; + + # Skip the arguments + for (my $i=0; $i<$numargs; $i++) { + ; + } + + $nbindings++; + print PERL "sub $name { return command (\"$name\", \@_); }"; + print ELISP "(defun-ratpoison $name)"; + print COMMONLISP "(defun-ratpoison $name)"; + print RUBY " def $name (*args)"; + print RUBY " return command (\"$name\", args)"; + print RUBY " end"; + print RUBY " module_function :$name\n"; + print PYTHON "def rp_$name( *args ): return rp_command ( '$name ' + ' '.join( args ) )"; + } + } } } print "$nbindings bindings."; diff --git a/contrib/nogaps.el b/contrib/nogaps.el index c1d2649..358319e 100644 --- a/contrib/nogaps.el +++ b/contrib/nogaps.el @@ -9,5 +9,5 @@ (defun ratpoison-nogaps () (let ((wins (mapcar 'string-to-number (split-string (ratpoison-windows "%n"))))) (loop for n in wins - for i from 1 to (length wins) - do (ratpoison-number i n)))) + for i from 1 to (length wins) + do (ratpoison-number i n)))) diff --git a/contrib/ratpoison.el b/contrib/ratpoison.el index afa501e..97bf2c0 100644 --- a/contrib/ratpoison.el +++ b/contrib/ratpoison.el @@ -8,7 +8,7 @@ ;; Maintainer: Gergely Nagy ;; Version: 0.2 ;; Keywords: faces, ratpoison, X -;; CVS Id: $Id: ratpoison.el,v 1.4 2004/12/02 00:33:22 sabetts Exp $ +;; CVS Id: $Id: ratpoison.el,v 1.5 2006/03/16 00:33:34 sabetts Exp $ ;; Last updated: <2001/10/05 17:58:38 algernon> ;; This file is NOT part of GNU Emacs. @@ -132,15 +132,15 @@ ratpoison-commands-rest font-lock-builtin-face "^[ \t]*" "[ \t]+") ;; exec (list "^[ \t]*\\(exec\\)[ \t]+\\(.*\\)" - '(1 'font-lock-builtin-face) - '(2 'font-lock-string-face)) + '(1 'font-lock-builtin-face) + '(2 'font-lock-string-face)) ;; arguments, the first is a keyword, the rest is tring (list (concat - (car (generic-make-keywords-list - ratpoison-commands-rest font-lock-builtin-face "^[ \t]*" "[ \t]+")) - "\\([0-9a-zA-Z\\/\\.\\-]+\\)[ \t]*\\(.*\\)") - '(2 'font-lock-keyword-face) - '(3 'font-lock-string-face))) + (car (generic-make-keywords-list + ratpoison-commands-rest font-lock-builtin-face "^[ \t]*" "[ \t]+")) + "\\([0-9a-zA-Z\\/\\.\\-]+\\)[ \t]*\\(.*\\)") + '(2 'font-lock-keyword-face) + '(3 'font-lock-string-face))) ;; auto-mode alist (list "\\.ratpoisonrc\\'") ;; additional setup functions @@ -174,8 +174,8 @@ (defun ratpoison-command-on-region (start end) (interactive "r") (mapcar 'ratpoison-command - (split-string (buffer-substring start end) - "\n"))) + (split-string (buffer-substring start end) + "\n"))) (defun ratpoison-line () "Send the current line to ratpoison." diff --git a/contrib/rpshowall.sh b/contrib/rpshowall.sh index 487ad90..cb02795 100644 --- a/contrib/rpshowall.sh +++ b/contrib/rpshowall.sh @@ -1,17 +1,17 @@ #!/bin/sh # rpshowall -# ratpoison script to show all open windows +# ratpoison script to show all open windows # Copyright (C) 2003 Florian Cramer -# Usage : +# Usage : # # rpshowall [no arguments] # if called from a terminal, show all open windows and # restore previous frame layout upon keystroke # # rpshowall [n>1] -# show all open windows for n seconds, +# show all open windows for n seconds, # then restore previous frame layout # # rpshowall 0 @@ -24,9 +24,9 @@ fi # Parse input argument if [ $*>0 ]; then - wait="$*" -else - wait=-1 + wait="$*" +else + wait=-1 fi @@ -40,34 +40,34 @@ curlayout=`$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]; +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 # Depending on the argument the script was executed with, # 1- select a new window and exit opening it fullscreen -# 2- restore frameset after keyboard input -# 3- restore frameset after $wait seconds of delay +# 2- restore frameset after keyboard input +# 3- restore frameset after $wait seconds of delay $RATPOISON -c "select $curframe" if [ $wait -eq 0 ]; then - $RATPOISON -i -c fselect - $RATPOISON -c only + $RATPOISON -i -c fselect + $RATPOISON -c only else - $RATPOISON -i -c windows - if [ $wait -eq -1 ]; then - echo -n "Hit return to restore window layout. " - read i - else - sleep $wait - fi - $RATPOISON -c "frestore $curlayout" + $RATPOISON -i -c windows + if [ $wait -eq -1 ]; then + echo -n "Hit return to restore window layout. " + read i + else + sleep $wait + fi + $RATPOISON -c "frestore $curlayout" fi diff --git a/contrib/rpws b/contrib/rpws index 580495f..181b964 100755 --- a/contrib/rpws +++ b/contrib/rpws @@ -6,11 +6,11 @@ # Author Mike O'Connor # # Modified by Shawn Betts. -# +# # code was adapeted from rpws that comes from ratpoison containing the follwing copyright: # Copyright (C) 2003 Shawn Betts # Author: Shawn Betts -# +# use strict; use Fcntl qw (:flock); @@ -36,9 +36,9 @@ sub rp_call sub ws_init_ws { - + my $num = shift; - + rp_call( "gnew wspl$num" ); my $fd = fdump(); rp_call( "setenv fspl$num $fd" ) @@ -62,9 +62,9 @@ sub ws_init my $i; for( my $i = 0; $i < $num; $i++ ) { - ws_init_ws( $i ); + ws_init_ws( $i ); } - + # Workspace 1 uses the 'default' group. # Start in workspace 1. $fd = fdump(); @@ -77,7 +77,7 @@ sub ws_init if( -e "$lockfile" ) { - unlink ("$lockfile" ); + unlink ("$lockfile" ); } } @@ -91,18 +91,18 @@ sub ws_save sub ws_restore { my $which = shift; - + ws_save(); - + if( $which == 1 ) { - rp_call( "gselect default" ); + rp_call( "gselect default" ); } else { - rp_call( "gselect wspl$which"); + rp_call( "gselect wspl$which"); } - + rp_call( "echo Workspace $which" ); my $last = rp_call( "getenv fspl$which" ); rp_call( "frestore $last" ); @@ -113,7 +113,7 @@ sub add_aliases { my $n = shift; foreach my $i (1..$n) { - rp_call ( "alias rpws$i exec $0 $i" ); + rp_call ( "alias rpws$i exec $0 $i" ); } } @@ -121,7 +121,7 @@ sub add_keys { my $n = shift; foreach my $i (1..$n) { - rp_call ( "definekey top M-F$i rpws$i" ); + rp_call ( "definekey top M-F$i rpws$i" ); } } @@ -164,9 +164,9 @@ rpws - Implements multiple workspaces in ratpoison ratpoison in the contrib directory. =head1 USAGE - + Add the following line in ~/.ratpoisonrc - + exec /path/to/rpws init 6 -k This creates 6 aliases rpws1, rpws2, etc. It also binds the keys M-F1, @@ -186,7 +186,7 @@ environment variable RPWS_LOCKFILE to your desired lockfile. Copyright (c) 2005 Mike O'Connor All rights reserved. - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 @@ -196,4 +196,3 @@ environment variable RPWS_LOCKFILE to your desired lockfile. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - diff --git a/contrib/unrat.c b/contrib/unrat.c index adce9b9..272ed6e 100644 --- a/contrib/unrat.c +++ b/contrib/unrat.c @@ -1,4 +1,4 @@ -/* Warp the pointer to the bottom right corner of the screen any time a key is pressed. +/* Warp the pointer to the bottom right corner of the screen any time a key is pressed. * * Copyright (C) 2005 Shawn Betts * @@ -6,12 +6,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. - * + * * unrat is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, @@ -61,38 +61,38 @@ main (int argc, char **argv) { unsigned int j, nwins; Window dw1, dw2, *wins; - + XSelectInput(display,RootWindow(display, i), KeyReleaseMask | SubstructureNotifyMask); XQueryTree(display, RootWindow(display, i), &dw1, &dw2, &wins, &nwins); for (j=0; j