[clfswm-devel] default keybinding

Philippe Brochard pbrochard at common-lisp.net
Sat Oct 23 21:16:06 UTC 2010


Fernando Aguayo writes:

> Hi,
>
Hi,

> I'm just trying out clfswm after some time using stumpwm.
>
Thanks for your interest in clfswm!

> I would like to know if there is a way to change globally the default
> modifier from mod-1 to, for example F20 (which I have mapped to the
> "windows" key). I could just make sed do it, but then I will have to
> be extra carefull when pulling from the git repository :(
>
You can have a look at contrib/keyb_fr.lisp to change only some
keybindings or you can redefine the functions set-default-main-keys,
set-default-main-mouse from binding.lisp and the same with the second
mode keybinding.

For example, put this in your .clfswmrc configuration file to have only
a minimal keybinding:

----------------------------------------------------------------------
(defun set-default-main-keys ()
  (define-main-key ("F1" :F20) 'help-on-clfswm)
  (define-main-key ("Home" :F20 :control :shift) 'exit-clfswm))
----------------------------------------------------------------------

You can then use sed on this function.

If you prefer a more lispy way, you can pull the last git version and
add something like this in your .clfswmrc:

----------------------------------------------------------------------
(defun change-mod-1-modifier ()
  (binding-substitute-modifier :F20 :mod-1))

(add-hook *binding-hook* 'change-mod-1-modifier)
----------------------------------------------------------------------

Be sure that this hook is the last binding hook (ie: put those lines at
the end of the configuration file).

To identify your new modifier (I'm not sure that :F20 will be recognized
as a modifier), you can use the identify key function (second-mode-key + i).


> Other issue I'm having is that the frames flicker a lot when changing
> from one to another. I'm using sbcl, could that be the problem?
>
There is a bug fixed in the last git version. There remains some frames
flickering because clfswm needs to raise the parent frame to display its
border.

> Thanks!
> Fernando
>
Regards,

Philippe






More information about the clfswm-devel mailing list