summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2014-02-11 21:40:32 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-02-20 00:18:54 +0100
commit4cdcce6a744376cebbba5aa016d9309248e9102c (patch)
tree4aa43ab096958281996b3707530405a2bdcab1b4
parentf17d025b1af7dd31cd12768a0fefa611b760a60b (diff)
downloadratpoison-4cdcce6a744376cebbba5aa016d9309248e9102c.zip
Add the "current" option to rpws to print the current workspace.
-rwxr-xr-xcontrib/rpws4
1 files changed, 4 insertions, 0 deletions
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 <fname> - dumps the current layout to <fname>
rpws restore <fname> - restores rpws workspaces from <fname>
+ rpws current - print the current workspace
rpws help - this documentation
rpws n - switch to this workspace