This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 
                    unix:wmii [2009/12/13 14:18] robm created  | 
                
                    unix:wmii [2009/12/20 20:19] (current) robm  | 
            ||
|---|---|---|---|
| Line 3: | Line 3: | ||
|   * http:// |   * http:// | ||
| + | |||
| + | ===== Creating ~/.wmii preferences ===== | ||
| + | <code bash> | ||
| + | # Boiler plate for Python support | ||
| + | mkdir ~/.wmii | ||
| + | cd ~/.wmii | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | |||
| + | # Probably want to modify wmiirc.py (only clean way to alter the colours) | ||
| + | cp / | ||
| + | cp / | ||
| + | </ | ||
| + | |||
| + | ===== Q: Why don't new window appear in the current view? ==== | ||
| + | A: Because they don't match the current tag. I wrote a script to tag all new windows with the current view. | ||
| + | |||
| + | '' | ||
| + | <code python> | ||
| + | # | ||
| + | import wmiirc | ||
| + | |||
| + | def debug(*args, | ||
| + | print args, kwargs | ||
| + | |||
| + | def tag_client_with_current_view(event, | ||
| + | 	wmiirc.Client(client).tags = " | ||
| + | |||
| + | any = wmiirc.Match(wmiirc._)	# | ||
| + | |||
| + | wmiirc.events.bind({ | ||
| + | #any: debug, | ||
| + | 	wmiirc.Match(" | ||
| + | }) | ||
| + | </ | ||
| + | |||
| + | Stand-alone script, does not require any special libraries (but isn't started automatically) | ||
| + | <code python> | ||
| + | # | ||
| + | |||
| + | import os | ||
| + | import sys | ||
| + | |||
| + | p = os.popen(" | ||
| + | while True: | ||
| + | event = p.readline() | ||
| + |     if event.startswith(" | ||
| + |         client = event.split(" | ||
| + |         os.system(" | ||
| + | |||
| + | </ | ||
| + | |||