Re: [dev] python configuration

From: Renato <rennabh_AT_gmail.com>
Date: Sun, 31 Oct 2010 20:53:54 +0100

On Sun, 31 Oct 2010 20:06:34 +0100
Renato <rennabh_AT_gmail.com> wrote:

> On Sun, 31 Oct 2010 19:44:19 +0100
> Renato <rennabh_AT_gmail.com> wrote:
>
> > On Sun, 31 Oct 2010 07:16:34 -0400
> > Kris Maglione <maglione.k_AT_gmail.com> wrote:
> >
> > > On Sun, Oct 31, 2010 at 12:01:22PM +0100, Renato wrote:
> > > >Hello, just installed wmii from the Archlinux repos and still
> > > >finding my way around it... I need some clarification on
> > > >configuring wmii.
> > > >
> > > >I'd like to configure it using python. What are my options? Can I
> > > >just copy the /etc/wmii/python directory to ~/.wmii and start
> > > >wmii with $ wmii -r ~/.wmii/python/wmiirc.py
> > > >?
> > >
> > > There should be no need to copy anything. Just run
> > > wmii -r python/wmiirc
> > >
> > > You can put your configuration in ~/.wmii/wmiirc_local.py,
> > >or otherwise copy /etc/wmii/python/wmiirc.py to ~/.wmii/wmiirc.py
> > > and modify it, if you prefer (though I don't recommend it).
> > >
> >
> > ok, I think I get it.
>
> maybe I don't... what if I want to change some default keybinding
> locally - without touching files in /etc ?
>
> should I import in ~/.wmii/wmiirc_local.py all python files
> from /etc/wmii/python and do something like
> key.bindings(...)
> ?
>

I'm allmost there... below is my ~/.wmii/wmiirc_local.py
What I would want to do is to change the default keybinding for closing
windows from modkey+shift+c to modkey+shift+z. With the current conf,
both shortcuts work... what should I do to override the default?

renato_AT_tosharch ~/.wmii $ cat wmiirc_local.py
import operator
import os
import re
import sys
from threading import Thread
import traceback

sys.path.insert(0,'/etc/wmii/python')

import pygmi
from pygmi import *

keys.bind('main', (
    "Client actions",
    ('%(mod)s-Shift-z', "Close client",
        lambda k: Client('sel').kill()),
))
Received on Sun Oct 31 2010 - 20:53:54 CET

This archive was generated by hypermail 2.2.0 : Sun Oct 31 2010 - 20:48:02 CET