]> git.sur5r.net Git - i3/i3/commit - include/all.h
Time Lord technology: for_window config directive to run arbitrary cmds
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 15 May 2011 18:10:25 +0000 (20:10 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 15 May 2011 18:10:25 +0000 (20:10 +0200)
commit5ae4620a2484a390dd63642ba66fbb4ca09cbd21
treeec4d5c8d6e4e450cc18a780adf76080d493ea500
parentca2e4199b5f0c9f3ba6488105e3dc59bd9c2d71e
Time Lord technology: for_window config directive to run arbitrary cmds

An example to set all XTerms floating:
    for_window [class="XTerm"] mode floating

To make all urxvts use a 1-pixel border:
    for_window [class="urxvt"] border 1pixel

A less useful, but rather funny example:
    for_window [title="x200: ~/work"] mode floating

The commands are not completely arbitrary. The commands above were tested,
others may need some fixing. Internally, windows are compared against your
criteria (class, title, …) when they are initially managed and whenever one of
the relevant values change. Then, the specified command is run *once* (per
window). It gets prefixed with a criteria to make it match only the specific
window that triggered it. So, if you configure "mode floating", i3 runs
something like '[id="8393923"] mode floating'.
15 files changed:
Makefile
include/all.h
include/assignments.h [new file with mode: 0644]
include/data.h
include/i3.h
include/window.h
src/assignments.c [new file with mode: 0644]
src/cfgparse.l
src/cfgparse.y
src/cmdparse.y
src/handlers.c
src/main.c
src/manage.c
src/match.c
src/window.c