From 708fa69f48f10dcbefc20633f553db660be47b24 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov
Date: Tue, 31 Dec 2013 00:08:15 +0100 Subject: [PATCH] Updated rpws to documents the "rpwsm$i" functionality, made it's bindings more sane and added an option "current" which prints the current workspace. --- contrib/rpws | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/contrib/rpws b/contrib/rpws index 49105c5..558fd1c 100755 --- a/contrib/rpws +++ b/contrib/rpws @@ -1,5 +1,10 @@ #!/usr/bin/env perl +# Copyright (c) 2013 Vasil Zlatanov +# All rights reserved. Modifications under same license as original script. +# Changelog: +# Updated manpage and hotkeys +# Added argument current which outputs the current workspace. # # Copyright (c) 2009 Hatem Nassrat # All rights reserved. Modifications under same license as original script. @@ -245,7 +250,7 @@ sub add_keys # Switch Workspace rp_call ( "definekey top M-F$i rpws$i" ); # Move Window to wrokspace - rp_call ( "definekey top C-M-S-F$i rpwsm$i" ); + rp_call ( "definekey top C-M-F$i rpwsm$i" ); } rp_call ( "definekey top C-M-Right rpwsn" ); rp_call ( "definekey top C-M-Left rpwsp" ); @@ -270,6 +275,9 @@ if( $arg eq "help" ) { } elsif( $arg eq "restore" ) { my $filename = shift @ARGV; ws_dumprestore($filename); +} elsif ( $arg eq "current" ) { + my $cws = rp_call( "getenv wspl" ); + print "$cws"; } else { open LOCK, ">>$lockfile" or die "Cannot open lockfile: $lockfile"; flock(LOCK, LOCK_EX); @@ -287,10 +295,11 @@ rpws - Implements multiple workspaces in ratpoison rpws init n [-k] [-a] - setup rpws with n workspaces. -a sets up command aliases; -k sets up key bindings and aliases. + rpws n - switch to this workspace rpws dump