08/06/2009

sx-autoclient

A plugin that has been asked for a few times ( ... ok - once! ) was something to allow putting clients onto specific desktops. What was really needed was just a simple plugin to perform actions on new clients. So now there is sx-autoclient which means you can do things like this in your config:

import logging
log = logging.getLogger(__name__)

def test_rule(screen, client):
    log.info('test rule!')
    client.actor.configure(x=100, y=100)


config = {
    'core.plugins': [
        #...
        'sxautoclient',
    ],

    #...

    'autoclient.rules': [test_rule],
        
}

...and all your new clients will be moved to 100,100.

Ok its still a bit low level, but once Iv added some simple rule functions for matching window names and classes and some easy actions it will be much better.

No comments: