Universal argument a lá Emacs for Xmonad

Dear all On Emacs you can pass certain functions an interactive argument via the C-u chord. For example you can press C-u 5 C-n to move 5 lines down the buffer. Sometimes I've wanted this functionality on XMonad, for example to be able to do stuff like `C-u 3 modm-m` to move to the third window counted from the main window if it exists. I wonder if somebody know if that's implemented as a module. -- -- Ruben -- PGP: 4EE9 28F7 932E F4AD

I don't know of one, but see no reason the machinery in (say)
X.A.CycleWindows couldn't be extended to do so. It'd be easier if held to
single digits, though.
General numeric argument as in emacs is harder, since the only automatic
parameter to commands is the focused window and even that is only for mouse
actions; there's nowhere to stick it except ExtensibleState for other
commands. Hypothetically a wrapper could repeat a command based on said
state, but that's not necessarily how you want to handle the parameter in
all cases (consider the question of whether the repeats start from the
original state or the final one, when the command changes e.g. focused
window; and worse when the focused window change happens only later such
that you can't really do something based on it).
On Fri, Nov 22, 2019 at 11:43 PM Ruben Astudillo
Dear all
On Emacs you can pass certain functions an interactive argument via the C-u chord. For example you can press C-u 5 C-n to move 5 lines down the buffer. Sometimes I've wanted this functionality on XMonad, for example to be able to do stuff like `C-u 3 modm-m` to move to the third window counted from the main window if it exists. I wonder if somebody know if that's implemented as a module.
-- -- Ruben -- PGP: 4EE9 28F7 932E F4AD
_______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
-- brandon s allbery kf8nh allbery.b@gmail.com

Hey Ruben, On Sat, Nov 23, 2019 at 01:43:36AM -0300, Ruben Astudillo wrote:
C-u chord. For example you can press C-u 5 C-n to move 5 lines down the
Is there any reason you're using C-u 5 and not M-5 here? -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercerpav@gmail.com

That's a good point too: it'd have to be M-C-u or have some starter
sequence like X.A.CycleWindows (M-Tab), or other programs would lose use of
C-u.
On Sat, Nov 23, 2019 at 8:19 AM Paul Fertser
Hey Ruben,
On Sat, Nov 23, 2019 at 01:43:36AM -0300, Ruben Astudillo wrote:
C-u chord. For example you can press C-u 5 C-n to move 5 lines down the
Is there any reason you're using C-u 5 and not M-5 here?
-- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercerpav@gmail.com _______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
-- brandon s allbery kf8nh allbery.b@gmail.com
participants (3)
-
Brandon Allbery
-
Paul Fertser
-
Ruben Astudillo