diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/rpws | 26 |
2 files changed, 21 insertions, 9 deletions
@@ -1,10 +1,12 @@ 2003-06-25 Shawn Betts <sabetts@sfu.ca> + * contrib/rpws: only set RATPOISON if it's not already set. + * src/actions.c (cmd_gmove): prompt the user if no group is passed as an argument. * contrib/rpws: call /bin/bash - (rp_call): remove extraneous () in function declaration. + (rp_call): remove extraneous 'function' keyword in function declaration. (ws_init_ws): likewise (ws_init): likewise (ws_save): likewise diff --git a/contrib/rpws b/contrib/rpws index ccf7e14..a2372a7 100755 --- a/contrib/rpws +++ b/contrib/rpws @@ -21,23 +21,32 @@ # # You want more workspaces? Edit this script. # + +# FIXME: Currently this depends on bash because I can't figure out how +# to pass argument to these functions. In bash $1 ... $n are bound to +# them, not so in plain bourne. +# # Code: # -RATPOISON=ratpoison +# This allows outside scripts to tell this script where to find +# ratpoison. +if [ -z $RATPOISON ]; then + RATPOISON=ratpoison +fi -function rp_call +rp_call () { $RATPOISON -c "$*" } -function ws_init_ws +ws_init_ws () { rp_call gnew ws$1 rp_call setenv fs$1 `rp_call fdump` } -function ws_init +ws_init () { # Backup the frames FS=`rp_call fdump` @@ -59,17 +68,16 @@ function ws_init rp_call setenv ws 1 # restore the frames - echo $FS rp_call frestore $FS } -function ws_save +ws_save () { WS=`rp_call getenv ws` rp_call setenv fs$WS `rp_call fdump` } -function ws_restore +ws_restore () { ws_save if [ $1 == 1 ]; then @@ -82,7 +90,7 @@ function ws_restore rp_call setenv ws $1 } -function ws_bindings +ws_bindings () { # Use $0 so we know the name and location of the script to call. rp_call bind M-1 exec $0 1 @@ -94,6 +102,8 @@ function ws_bindings rp_call bind M-7 exec $0 7 } +echo boom >/tmp/boom + if [ -z $@ ]; then echo "Usage:" echo "$0 -i -- initialize the workspaces" |