summaryrefslogtreecommitdiff
path: root/contrib/rpws
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/rpws')
-rwxr-xr-xcontrib/rpws35
1 files changed, 17 insertions, 18 deletions
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 <stew@vireo.org>
#
# 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.
-