1 -- Authors: Philipp Hartwig <ph@phhart.de>
2 -- License: MIT, see http://opensource.org/licenses/mit-license.php
3 -- Last Changed: 2012-09-29
7 Description: This function sets focus to the first client with the given
12 1) Define a tag for a client, using a winprop.
15 class = "Firefox-bin",
16 instance = "Navigator",
20 2) Add suitable bindings to the "WMPlex.toplevel" section of cfg_notioncore.
23 kpress("A", "goto_by_tag('a')"),
24 kpress("B", "goto_by_tag('b')"),
25 kpress("C", "goto_by_tag('c')"),
26 kpress("D", "goto_by_tag('d')"),
27 kpress("E", "goto_by_tag('e')"),
28 kpress("F", "goto_by_tag('f')"),
29 kpress("G", "goto_by_tag('g')"),
30 kpress("H", "goto_by_tag('h')"),
31 kpress("I", "goto_by_tag('i')"),
32 kpress("J", "goto_by_tag('j')"),
33 kpress("K", "goto_by_tag('k')"),
34 kpress("L", "goto_by_tag('l')"),
35 kpress("M", "goto_by_tag('m')"),
36 kpress("N", "goto_by_tag('n')"),
37 kpress("O", "goto_by_tag('o')"),
38 kpress("P", "goto_by_tag('p')"),
39 kpress("Q", "goto_by_tag('q')"),
40 kpress("R", "goto_by_tag('r')"),
41 kpress("S", "goto_by_tag('s')"),
42 kpress("T", "goto_by_tag('t')"),
43 kpress("U", "goto_by_tag('u')"),
44 kpress("V", "goto_by_tag('v')"),
45 kpress("W", "goto_by_tag('w')"),
46 kpress("X", "goto_by_tag('x')"),
47 kpress("Y", "goto_by_tag('y')"),
48 kpress("Z", "goto_by_tag('z')"),
51 3) In the example above, you can directly jump to the first instance of Firefox
56 goto_by_tag
= function(tag)
58 ioncore
.clientwin_i(function(cwin
)
59 local winprop
= ioncore
.getwinprop(cwin
)
60 if winprop
and winprop
.tag == tag then