From 4cdcce6a744376cebbba5aa016d9309248e9102c Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Tue, 11 Feb 2014 21:40:32 +0100 Subject: Add the "current" option to rpws to print the current workspace. --- contrib/rpws | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/rpws b/contrib/rpws index 49105c5..88d2aa4 100755 --- a/contrib/rpws +++ b/contrib/rpws @@ -270,6 +270,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); @@ -289,6 +292,7 @@ rpws - Implements multiple workspaces in ratpoison -k sets up key bindings and aliases. rpws dump - dumps the current layout to rpws restore - restores rpws workspaces from + rpws current - print the current workspace rpws help - this documentation rpws n - switch to this workspace -- cgit v1.2.3