Re: [dwm] Keys with prefix

From: Ali Gholami Rudi <aligrudi_AT_gmail.com>
Date: Fri, 5 Oct 2007 12:31:15 +0330

On Thu, Oct 04, 2007 at 03:01:12PM +0330, Ali Gholami Rudi wrote:
> I've written a patch to allow prefixed keys.
>
> With this patch you can bind ``C-t k`` (where ``C-t`` is your prefix),
> for instance, to kill window or ``C-t 1`` to ``view("1")``. You can
> change the prefix by editing the line that contains the ``setprefix``
> function in the config file.
>
> I've written this patch because:
>
> * Some of dwm's default keys conflict with emacs keybinding
> * Some emacs users, including me, don't like to push three buttons at
> the same time very oftern
> * If ``? x`` (? is the prefix and x is a tag) is bound to view("x"),
> letters can be a tag like digits.
> * Prefixed and normal keys can coexist
>
> I didn't know dwm's policy for submitting patches; so I've attached
> the outcome of ``hg export``.

In the last patch prefixed keys could not contain modifiers such as
``? shift-1`` (where ``?`` is the prefix). This patch fixes it.
So now one can bind:

* C-; x -> view("x")
* C-; shift-x -> tag("x")
* C-; C-x -> toggleview("x")
* C-; C-shift-x -> toggletag("x")

for both letters and digits (where ``C-;`` is the prefix).

--Ali

Received on Fri Oct 05 2007 - 11:01:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:57:34 UTC