Delivered-To: vasil.zlatanov@gmail.com Received: by 10.76.171.200 with SMTP id aw8csp868753oac; Thu, 2 Jan 2014 07:40:12 -0800 (PST) X-Received: by 10.15.33.199 with SMTP id c47mr9240508eev.109.1388677211840; Thu, 02 Jan 2014 07:40:11 -0800 (PST) Return-Path: Received: from chomsky.autogeree.net (chomsky.autogeree.net. [91.216.110.36]) by mx.google.com with ESMTPS id m49si66295635eeg.94.2014.01.02.07.40.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 Jan 2014 07:40:11 -0800 (PST) Received-SPF: pass (google.com: domain of jca@wxcvbn.org designates 91.216.110.36 as permitted sender) client-ip=91.216.110.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jca@wxcvbn.org designates 91.216.110.36 as permitted sender) smtp.mail=jca@wxcvbn.org Received: from shannon.wxcvbn.org (localhost [127.0.0.1]) by wxcvbn.org (8.14.7/8.14.7) with ESMTP id s02FZsa3000970; Thu, 2 Jan 2014 16:35:54 +0100 (CET) Received: (from jca@localhost) by shannon.wxcvbn.org (8.14.7/8.14.7/Submit) id s02FZrPD004508; Thu, 2 Jan 2014 16:35:53 +0100 (CET) From: jca@wxcvbn.org (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Anglas?=) To: Vasil Zlatanov Cc: ratpoison-devel@nongnu.org Subject: Re: [RP] Small Update rpws References: <20131230232733.GA17881@gmail.com> Date: Thu, 02 Jan 2014 16:35:45 +0100 In-Reply-To: <20131230232733.GA17881@gmail.com> (Vasil Zlatanov's message of "Tue, 31 Dec 2013 00:27:37 +0100") Message-ID: <87sit6jt0u.fsf@shannon.wxcvbn.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Vasil Zlatanov writes: > I've been asked a few times on IRC about a command to move the current > window to a selected workspace, which is undocemented for some reason. I think it is documented: This creates 6 aliases rpws1, rpws2, etc. It also binds the keys M-= F1, M-F2, etc to each rpwsN alias. Moreover, rpwsn (Next) and rpwsp (Pr= ev) are created, and C-M-{Right,Left} are bound to rpws{n,p}. Full list= of keybindings created are: M-F$i Goto workspace $i C-M-Right Goto Next workspace C-M-Left Goto Prev workspace C-M-S-F$i Move window to workspace $i C-M-greater Move current window to next workspace C-M-less Move current window to prev workspace So did those users actually read ''perldoc rpws''? Because I think that's the problem at stake here. Also: =2D adding a wordy description for rpwsm$i without doing the same for rpwsm[np] looks weird to me. =2D replacing the default keybindings is an unrelated change and means that users used to C-M-S-F$i will have to change their habits or modify rpws/their config. This is not desirable, IMHO. > Addionaly I added an option that prints the current workspace which > would be usefull for conky like configs. I'm not opposed to this (that would be a separate patch), but what's the advantage over ratpoison -c "getenv wspl"? Cheers, > 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, m= ade > 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 >=20=20 > +# Copyright (c) 2013 Vasil Zlatanov > +# All rights reserved. Modifications under same license as original scri= pt. > +# 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 scri= pt. > @@ -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 =3D shift @ARGV; > ws_dumprestore($filename); > +} elsif ( $arg eq "current" ) { > + my $cws =3D 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 - dumps the current layout to > rpws restore - restores rpws workspaces from > + rpws current - print the number of the current workspace > rpws help - this documentation > - rpws n - switch to this workspace >=20=20 >=20=20 > =3Dhead1 DESCRIPTION > @@ -306,14 +315,15 @@ Add the following line in ~/.ratpoisonrc > exec /path/to/rpws init 6 -k >=20=20 > This creates 6 aliases rpws1, rpws2, etc. It also binds the keys M-F1, > -M-F2, etc to each rpwsN alias. Moreover, rpwsn (Next) and rpwsp (Prev) a= re > +M-F2, etc to each rpwsN alias. Aliases rpwsm1, rpwsm2, etc, are used to > +move the focused window to another workspace. Moreover, rpwsn (Next) and= rpwsp (Prev) are > created, and C-M-{Right,Left} are bound to rpws{n,p}. Full list of keybi= ndings > created are: >=20=20 > M-F$i Goto workspace $i > C-M-Right Goto Next workspace > C-M-Left Goto Prev workspace > - C-M-S-F$i Move window to workspace $i > + C-M-F$i Move window to workspace $i > C-M-greater Move current window to next workspace > C-M-less Move current window to prev workspace =2D-=20 jca | PGP: 0x06A11494 / 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJSxYdSAAoJEGGRj78GoRSUqnoP/28wNXr6rqo29G51/jkY+Nqw p62BdLn/sOu7w1W3zsbIgM2koLrFu1vKhAzFcbx7/GaaIbDQA4JX5aJXApmPHePY Hj963mV94JooGOhO2WRQ3ZmSSsMbOz9Lszyt8F1J5tcvL2MVdAZDiSXbMcOBi0PC XQRJR1kbkihZasTZtfXwEaVd/4GjXhV0osMXlSY3ftf3VyeU4eqtF8PaKv1UiN1E hZLND4TgdWJJK5DWAhFI6TwJqzooMZ8BBkI+oaRK6KxOljTy5JgP9kSFtaIJgiNf GeLoxhYBv6GGgSDSSFpuAbasGO8c9MMJ4lP0gFUxJpMX7Wu911qaJzORwtZWNXTi b5seNofzj6YACnnIS30sMeouOyRg/54dwVyI+Lirhtwg+N74/W7reZ2YbAGQeacS ujMwcqglXyruMWOWEMt84McHrlknDu3B8+1YSrCVqTIP5GOm93b5YaPFu+ON5pjc 4EZ8sroPYnJDD/C6qEnQxF6q7hfsjWvg6Yv/T1ivksssMUJzHoxIZgtd5FICqu8I Froh5hPmIEe8C0FshTjcwno4/suiUsgQi7CQsJx6OFZvx2Ma6UcvjZrewp29m9jz Ca5HTC2F4ZBUkpZOFDClMvkWC0WXu+kNW95RySEU750PfvRQyBH9Axpa695a3IxC +yjChDEkNcTYsKRwvrVS =5FTA -----END PGP SIGNATURE----- --=-=-=--