Project

General

Profile

unexist.dev

Assorted tidbits and projects

FAQ » History » Version 4

Christoph Kappel, 01/23/2018 02:25 PM

1 1 Christoph Kappel
h1. FAQ
2 1 Christoph Kappel
3 1 Christoph Kappel
{{toc}}
4 1 Christoph Kappel
5 3 Christoph Kappel
h2.  How do I start program xyz?
6 1 Christoph Kappel
7 3 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
8 3 Christoph Kappel
9 3 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
10 3 Christoph Kappel
11 3 Christoph Kappel
<pre><code class="ruby">
12 3 Christoph Kappel
subtle &
13 3 Christoph Kappel
PID=$!
14 3 Christoph Kappel
sleep 2
15 3 Christoph Kappel
urxvt
16 3 Christoph Kappel
wait $PID
17 3 Christoph Kappel
</code></pre>
18 3 Christoph Kappel
19 3 Christoph Kappel
* Start your program via [[grab]]:
20 3 Christoph Kappel
21 3 Christoph Kappel
<pre><code class="ruby">
22 3 Christoph Kappel
"A-x" => "urxvt"
23 3 Christoph Kappel
</code></pre>
24 3 Christoph Kappel
25 3 Christoph Kappel
_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
26 3 Christoph Kappel
27 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
28 3 Christoph Kappel
29 3 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
30 3 Christoph Kappel
31 3 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
32 3 Christoph Kappel
33 3 Christoph Kappel
[[Subtler]]:
34 3 Christoph Kappel
<pre><code class="ruby">
35 3 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
36 3 Christoph Kappel
subtler -cT view tag    #< Tag view 'view' with tag 'tag'
37 3 Christoph Kappel
subtler -vT client tag  #< Tag client 'client' with tag 'tag'
38 3 Christoph Kappel
</code></pre>
39 3 Christoph Kappel
40 3 Christoph Kappel
[[Subtlext]]:
41 3 Christoph Kappel
<pre><code class="ruby">
42 3 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
43 3 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
44 3 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
45 3 Christoph Kappel
</code></pre>
46 3 Christoph Kappel
47 3 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
48 3 Christoph Kappel
49 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
50 3 Christoph Kappel
51 3 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
52 3 Christoph Kappel
53 3 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
54 3 Christoph Kappel
55 3 Christoph Kappel
[[Subtler]]:
56 3 Christoph Kappel
<pre><code class="ruby">
57 3 Christoph Kappel
subtler -ta tag           #< Add new tag 'tag'
58 3 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
59 3 Christoph Kappel
subtler -vT view tag   #< Tag view 'view' with tag 'tag'
60 3 Christoph Kappel
</code></pre>
61 3 Christoph Kappel
62 3 Christoph Kappel
[[Subtlext]]:
63 3 Christoph Kappel
<pre><code class="ruby">
64 3 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
65 3 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
66 3 Christoph Kappel
s.find_view("view").tag("tag")    #< Tag view 'view' with tag 'tag'
67 3 Christoph Kappel
</code></pre>
68 3 Christoph Kappel
69 3 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
70 3 Christoph Kappel
71 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
72 3 Christoph Kappel
73 3 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
74 3 Christoph Kappel
75 3 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
76 3 Christoph Kappel
77 3 Christoph Kappel
[[Subtler]]:
78 3 Christoph Kappel
<pre><code class="ruby">
79 3 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
80 3 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
81 3 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
82 3 Christoph Kappel
</code></pre>
83 3 Christoph Kappel
84 3 Christoph Kappel
[[Subtlext]]:
85 3 Christoph Kappel
<pre><code class="ruby">
86 3 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
87 3 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
88 3 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
89 3 Christoph Kappel
</code></pre>
90 3 Christoph Kappel
91 3 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
92 3 Christoph Kappel
93 3 Christoph Kappel
h2.  How does subtle match clients?
94 3 Christoph Kappel
95 1 Christoph Kappel
[[Subtle]] matches the {{color(#ff0000, WM_NAME)}} and the {{color(#0000ff, WM_CLASS)}} property of a window and not the title. This to ensure the match is correct. 
96 2 Christoph Kappel
There are several ways to get these values, here are the most common:
97 1 Christoph Kappel
98 2 Christoph Kappel
* "xprop":http://www.xfree86.org/current/xprop.1.html: Just select the window and have a look for the WM_CLASS line which usually look like this:
99 1 Christoph Kappel
100 2 Christoph Kappel
p{class:pre}. WM_CLASS(STRING) = "{{color(#ff0000, urxvt)}}", "{{color(#0000ff, URxvt)}}")
101 1 Christoph Kappel
102 2 Christoph Kappel
* [[subtler]]: Run *[[subtler]] -cl* and look for the matching line:
103 1 Christoph Kappel
104 1 Christoph Kappel
p{class:pre}. 0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})
105 2 Christoph Kappel
106 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
107 3 Christoph Kappel
108 1 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
109 2 Christoph Kappel
110 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
111 2 Christoph Kappel
112 2 Christoph Kappel
[[Subtler]]:
113 2 Christoph Kappel
<pre><code class="ruby">
114 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
115 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
116 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
117 2 Christoph Kappel
</code></pre>
118 2 Christoph Kappel
119 2 Christoph Kappel
[[Subtlext]]:
120 2 Christoph Kappel
<pre><code class="ruby">
121 2 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
122 2 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
123 2 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
124 2 Christoph Kappel
</code></pre>
125 2 Christoph Kappel
126 2 Christoph Kappel
[[Grabs]]:
127 2 Christoph Kappel
<pre><code class="ruby">
128 2 Christoph Kappel
def move_view(client, view_id)
129 2 Christoph Kappel
  begin
130 2 Christoph Kappel
    cur  = current_view
131 2 Christoph Kappel
    view = views[view_id - 1]
132 2 Christoph Kappel
133 2 Christoph Kappel
    begin
134 2 Christoph Kappel
      tag = find_tag(view.name)
135 2 Christoph Kappel
    rescue
136 2 Christoph Kappel
      tag = add_tag(view.name)
137 2 Christoph Kappel
    end
138 2 Christoph Kappel
139 2 Christoph Kappel
    # Remove client from current tag
140 2 Christoph Kappel
    if(client.has_tag?(cur.name))
141 2 Christoph Kappel
      client.untag(cur.name)
142 2 Christoph Kappel
    end
143 2 Christoph Kappel
  
144 2 Christoph Kappel
    # Tag new view with itself
145 2 Christoph Kappel
    if(!view.has_tag?(tag))
146 2 Christoph Kappel
      view.tag(tag)
147 2 Christoph Kappel
    end
148 2 Christoph Kappel
149 2 Christoph Kappel
    # Finally add tag to client
150 2 Christoph Kappel
    client.tag(tag)
151 2 Christoph Kappel
  rescue => err
152 2 Christoph Kappel
    puts err
153 2 Christoph Kappel
  end
154 2 Christoph Kappel
end
155 2 Christoph Kappel
156 2 Christoph Kappel
GRABS = {
157 2 Christoph Kappel
  "A-F1" => lambda { |c| move_view(c, 1) },
158 2 Christoph Kappel
  "A-F2" => lambda { |c| move_view(c, 2) },
159 2 Christoph Kappel
  "A-F3" => lambda { |c| move_view(c, 3) },
160 2 Christoph Kappel
  "A-F4" => lambda { |c| move_view(c, 4) }
161 2 Christoph Kappel
}
162 1 Christoph Kappel
</code></pre>
163 1 Christoph Kappel
164 2 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
165 1 Christoph Kappel
166 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
167 3 Christoph Kappel
168 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
169 2 Christoph Kappel
170 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
171 2 Christoph Kappel
172 2 Christoph Kappel
[[Subtler]]:
173 2 Christoph Kappel
<pre><code class="ruby">
174 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
175 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
176 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
177 2 Christoph Kappel
</code></pre>
178 2 Christoph Kappel
179 2 Christoph Kappel
[[Subtlext]]:
180 2 Christoph Kappel
<pre><code class="ruby">
181 2 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
182 2 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
183 2 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
184 2 Christoph Kappel
</code></pre>
185 2 Christoph Kappel
186 2 Christoph Kappel
Or with [[grabs]] and "Ruby":http://www.ruby-lang.org lambdas:
187 2 Christoph Kappel
188 2 Christoph Kappel
[[Grabs]]:
189 2 Christoph Kappel
<pre><code class="ruby">
190 2 Christoph Kappel
def move_view(client, view_id)
191 2 Christoph Kappel
  begin
192 2 Christoph Kappel
    cur  = current_view
193 2 Christoph Kappel
    view = views[view_id - 1]
194 2 Christoph Kappel
195 2 Christoph Kappel
    begin
196 2 Christoph Kappel
      tag = find_tag(view.name)
197 2 Christoph Kappel
    rescue
198 2 Christoph Kappel
      tag = add_tag(view.name)
199 2 Christoph Kappel
    end
200 2 Christoph Kappel
201 2 Christoph Kappel
    # Remove client from current tag
202 2 Christoph Kappel
    if(client.has_tag?(cur.name))
203 2 Christoph Kappel
      client.untag(cur.name)
204 2 Christoph Kappel
    end
205 2 Christoph Kappel
  
206 2 Christoph Kappel
    # Tag new view with itself
207 2 Christoph Kappel
    if(!view.has_tag?(tag))
208 2 Christoph Kappel
      view.tag(tag)
209 2 Christoph Kappel
    end
210 2 Christoph Kappel
211 2 Christoph Kappel
    # Finally add tag to client
212 2 Christoph Kappel
    client.tag(tag)
213 2 Christoph Kappel
  rescue => err
214 2 Christoph Kappel
    puts err
215 2 Christoph Kappel
  end
216 2 Christoph Kappel
end
217 2 Christoph Kappel
218 2 Christoph Kappel
GRABS = {
219 2 Christoph Kappel
  "A-F1" => lambda { |c| move_view(c, 1) },
220 2 Christoph Kappel
  "A-F2" => lambda { |c| move_view(c, 2) },
221 2 Christoph Kappel
  "A-F3" => lambda { |c| move_view(c, 3) },
222 1 Christoph Kappel
  "A-F4" => lambda { |c| move_view(c, 4) }
223 1 Christoph Kappel
}
224 1 Christoph Kappel
</code></pre>
225 2 Christoph Kappel
226 1 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
227 2 Christoph Kappel
228 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
229 3 Christoph Kappel
230 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
231 2 Christoph Kappel
232 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
233 2 Christoph Kappel
234 2 Christoph Kappel
[[Subtler]]:
235 2 Christoph Kappel
<pre><code class="ruby">
236 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
237 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
238 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
239 2 Christoph Kappel
</code></pre>
240 2 Christoph Kappel
241 2 Christoph Kappel
[[Subtlext]]:
242 2 Christoph Kappel
<pre><code class="ruby">
243 2 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
244 2 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
245 2 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
246 1 Christoph Kappel
</code></pre>
247 1 Christoph Kappel
248 1 Christoph Kappel
Please also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
249 2 Christoph Kappel
250 1 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
251 2 Christoph Kappel
252 3 Christoph Kappel
h2.  How do I set a wallpaper in subtle?
253 3 Christoph Kappel
254 2 Christoph Kappel
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this. 
255 2 Christoph Kappel
256 2 Christoph Kappel
Due the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before. 
257 2 Christoph Kappel
258 2 Christoph Kappel
This can be bypassed with this:
259 1 Christoph Kappel
260 1 Christoph Kappel
<pre><code class="ruby">subtle &
261 2 Christoph Kappel
PID=$!
262 1 Christoph Kappel
display -window root pixmap.png
263 2 Christoph Kappel
wait $PID
264 1 Christoph Kappel
</code></pre>
265 2 Christoph Kappel
266 3 Christoph Kappel
h2.  How do I set a wallpaper in subtle?
267 3 Christoph Kappel
268 2 Christoph Kappel
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this. 
269 2 Christoph Kappel
270 2 Christoph Kappel
Due the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before. 
271 2 Christoph Kappel
272 2 Christoph Kappel
This can be bypassed with this:
273 2 Christoph Kappel
274 1 Christoph Kappel
<pre><code class="ruby">subtle &
275 1 Christoph Kappel
PID=$!
276 2 Christoph Kappel
display -window root pixmap.png
277 2 Christoph Kappel
wait $PID
278 1 Christoph Kappel
</code></pre>
279 2 Christoph Kappel
280 1 Christoph Kappel
Or just comment out the background line.
281 2 Christoph Kappel
282 3 Christoph Kappel
h2.  How do I run a java program?
283 3 Christoph Kappel
284 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
285 2 Christoph Kappel
286 2 Christoph Kappel
If this happens just try to start your program like this:
287 2 Christoph Kappel
288 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
289 2 Christoph Kappel
290 2 Christoph Kappel
This changes the default tookit of "Java":http://java.com to MToolkit, which is known to work with non-reparenting windows managers like [[subtle]]. Dependend on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
291 2 Christoph Kappel
292 1 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
293 1 Christoph Kappel
294 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
295 2 Christoph Kappel
296 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
297 1 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
298 2 Christoph Kappel
299 1 Christoph Kappel
300 2 Christoph Kappel
301 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
302 3 Christoph Kappel
303 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
304 2 Christoph Kappel
305 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
306 2 Christoph Kappel
307 2 Christoph Kappel
[[Subtler]]:
308 2 Christoph Kappel
<pre><code class="ruby">
309 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
310 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
311 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
312 2 Christoph Kappel
</code></pre>
313 2 Christoph Kappel
314 2 Christoph Kappel
[[Subtlext]]:
315 1 Christoph Kappel
<pre><code class="ruby">
316 1 Christoph Kappel
s = Subtlext::Subtle.new            #< Connect to subtle
317 2 Christoph Kappel
s.find_client("client").tag("tag")  #< Tag client 'client' with tag 'tag'
318 2 Christoph Kappel
s.find_view("view").tag("tag")      #< Tag view 'view' with tag 'tag'
319 2 Christoph Kappel
</code></pre>
320 2 Christoph Kappel
321 1 Christoph Kappel
Please also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
322 2 Christoph Kappel
323 1 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
324 2 Christoph Kappel
325 3 Christoph Kappel
h2.  How do I start program xyz?
326 3 Christoph Kappel
327 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
328 2 Christoph Kappel
329 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
330 2 Christoph Kappel
331 2 Christoph Kappel
<pre><code class="ruby">
332 2 Christoph Kappel
subtle &
333 2 Christoph Kappel
PID=$!
334 2 Christoph Kappel
sleep 2
335 2 Christoph Kappel
urxvt
336 1 Christoph Kappel
wait $PID
337 1 Christoph Kappel
</code></pre>
338 2 Christoph Kappel
339 2 Christoph Kappel
* Start your program via [[grab]]:
340 2 Christoph Kappel
341 2 Christoph Kappel
<pre><code class="ruby">
342 2 Christoph Kappel
"A-x" => "urxvt"
343 1 Christoph Kappel
</code></pre>
344 2 Christoph Kappel
345 1 Christoph Kappel
_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
346 2 Christoph Kappel
347 3 Christoph Kappel
h2.  How do I run a java program?
348 3 Christoph Kappel
349 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
350 2 Christoph Kappel
351 2 Christoph Kappel
If this happens just try to start your program like this:
352 2 Christoph Kappel
353 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
354 1 Christoph Kappel
355 1 Christoph Kappel
This changes the default tookit of "Java":http://java.com to MToolkit, which is known to work with non-reparenting windows managers like [[subtle]]. Dependend on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
356 2 Christoph Kappel
357 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
358 2 Christoph Kappel
359 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
360 2 Christoph Kappel
361 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
362 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
363 1 Christoph Kappel
364 2 Christoph Kappel
365 1 Christoph Kappel
366 3 Christoph Kappel
h2.  How do I run a java program?
367 3 Christoph Kappel
368 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
369 2 Christoph Kappel
370 2 Christoph Kappel
If this happens just try to start your program like this:
371 2 Christoph Kappel
372 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
373 2 Christoph Kappel
374 1 Christoph Kappel
This changes the default tookit of "Java":http://java.com to MToolkit, which is known to work with non-reparenting windows managers like [[subtle]]. Dependend on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
375 1 Christoph Kappel
376 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
377 2 Christoph Kappel
378 2 Christoph Kappel
In case both doesn't work there is a third option: The JDK internally uses a hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org made the tool "wmname":http://tools.suckless.org/wmname to change the name of the wm and just lie to Java. 
379 2 Christoph Kappel
380 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
381 2 Christoph Kappel
382 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
383 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
384 1 Christoph Kappel
385 2 Christoph Kappel
386 1 Christoph Kappel
387 3 Christoph Kappel
h2.  How do I run a java program?
388 3 Christoph Kappel
389 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
390 2 Christoph Kappel
391 2 Christoph Kappel
If this happens just try to start your program like this:
392 2 Christoph Kappel
393 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
394 1 Christoph Kappel
395 1 Christoph Kappel
This changes the default tookit of "Java":http://java.com to MToolkit, which is known to work with non-reparenting windows managers like [[subtle]]. Dependend on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
396 2 Christoph Kappel
397 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
398 2 Christoph Kappel
399 2 Christoph Kappel
In case both doesn't work there is a third option: The JDK internally uses a hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made the tool "wmname":http://tools.suckless.org/wmname to change the name of the wm and just lie to Java. 
400 2 Christoph Kappel
401 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
402 2 Christoph Kappel
403 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
404 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
405 1 Christoph Kappel
406 2 Christoph Kappel
407 1 Christoph Kappel
408 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
409 3 Christoph Kappel
410 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
411 2 Christoph Kappel
412 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
413 2 Christoph Kappel
414 2 Christoph Kappel
[[Subtler]]:
415 2 Christoph Kappel
<pre><code class="ruby">
416 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
417 1 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
418 1 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
419 2 Christoph Kappel
</code></pre>
420 2 Christoph Kappel
421 2 Christoph Kappel
[[Subtlext]]:
422 2 Christoph Kappel
<pre><code class="ruby">
423 2 Christoph Kappel
Subtlext::Tag.new("tag").save       #< Add new tag 'tag'
424 2 Christoph Kappel
Subtlext::Client["client"] + "tag"  #< Tag client 'client' with tag 'tag'
425 2 Christoph Kappel
Subtlext::View["view"] + "tag"      #< Tag view 'view' with tag 'tag'
426 2 Christoph Kappel
</code></pre>
427 2 Christoph Kappel
428 2 Christoph Kappel
Please also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
429 2 Christoph Kappel
430 1 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
431 2 Christoph Kappel
432 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
433 3 Christoph Kappel
434 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
435 2 Christoph Kappel
436 2 Christoph Kappel
You can change tags either with [[subtler]] or [[subtlext]] per runtime:
437 2 Christoph Kappel
438 2 Christoph Kappel
[[Subtler]]:
439 2 Christoph Kappel
<pre><code class="ruby">
440 1 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
441 1 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
442 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
443 2 Christoph Kappel
</code></pre>
444 2 Christoph Kappel
445 2 Christoph Kappel
[[Subtlext]]:
446 2 Christoph Kappel
<pre><code class="ruby">
447 2 Christoph Kappel
Subtlext::Tag.new("tag").save       #< Add new tag 'tag'
448 2 Christoph Kappel
Subtlext::Client["client"] + "tag"  #< Tag client 'client' with tag 'tag'
449 2 Christoph Kappel
Subtlext::View["view"] + "tag"      #< Tag view 'view' with tag 'tag'
450 2 Christoph Kappel
</code></pre>
451 2 Christoph Kappel
452 1 Christoph Kappel
Please also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
453 2 Christoph Kappel
454 1 Christoph Kappel
In _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
455 2 Christoph Kappel
456 3 Christoph Kappel
h2.  How do I add tags to console based programs?
457 3 Christoph Kappel
458 2 Christoph Kappel
Generally [[subtle]] can apply [[Tagging|tags]] based on the {{color(#0000ff, WM_NAME)}} and both {{color(#ff0000, WM_CLASS)}} components. Console based programs like "irssi":http://irssi.org can be started like this and will change the {{color(#0000ff, WM_NAME)}} of the terminal:
459 2 Christoph Kappel
460 2 Christoph Kappel
<pre><code class="bash">urxvt -e irssi</code></pre>
461 2 Christoph Kappel
462 2 Christoph Kappel
Inspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
463 2 Christoph Kappel
464 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
465 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
466 2 Christoph Kappel
467 2 Christoph Kappel
So if we want to tag this window there are some things that should be considered:
468 2 Christoph Kappel
469 2 Christoph Kappel
* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
470 2 Christoph Kappel
* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
471 2 Christoph Kappel
* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
472 2 Christoph Kappel
473 1 Christoph Kappel
To safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
474 1 Christoph Kappel
475 2 Christoph Kappel
<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
476 2 Christoph Kappel
477 2 Christoph Kappel
This results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
478 2 Christoph Kappel
479 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
480 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
481 2 Christoph Kappel
482 2 Christoph Kappel
A [[Tagging|tag]] for this could be:
483 2 Christoph Kappel
484 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
485 2 Christoph Kappel
  match "irssi"
486 1 Christoph Kappel
end</code></pre>
487 2 Christoph Kappel
488 1 Christoph Kappel
Please keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
489 2 Christoph Kappel
490 3 Christoph Kappel
h2.  How do I tag console based programs?
491 3 Christoph Kappel
492 2 Christoph Kappel
Generally [[subtle]] can apply [[Tagging|tags]] based on the {{color(#0000ff, WM_NAME)}} and both {{color(#ff0000, WM_CLASS)}} components. Console based programs like "irssi":http://irssi.org can be started like this and will change the {{color(#0000ff, WM_NAME)}} of the terminal:
493 2 Christoph Kappel
494 2 Christoph Kappel
<pre><code class="bash">urxvt -e irssi</code></pre>
495 2 Christoph Kappel
496 2 Christoph Kappel
Inspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
497 2 Christoph Kappel
498 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
499 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
500 2 Christoph Kappel
501 2 Christoph Kappel
So if we want to tag this window there are some things that should be considered:
502 2 Christoph Kappel
503 2 Christoph Kappel
* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
504 2 Christoph Kappel
* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
505 2 Christoph Kappel
* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
506 1 Christoph Kappel
507 1 Christoph Kappel
To safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
508 2 Christoph Kappel
509 2 Christoph Kappel
<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
510 2 Christoph Kappel
511 2 Christoph Kappel
This results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
512 2 Christoph Kappel
513 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
514 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
515 2 Christoph Kappel
516 2 Christoph Kappel
A [[Tagging|tag]] for this could be:
517 2 Christoph Kappel
518 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
519 1 Christoph Kappel
  match "irssi"
520 1 Christoph Kappel
end</code></pre>
521 1 Christoph Kappel
522 2 Christoph Kappel
Please keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
523 2 Christoph Kappel
524 3 Christoph Kappel
h2.  How does subtle match clients?
525 3 Christoph Kappel
526 2 Christoph Kappel
[[subtle]] matches the {{color(#ff0000, WM_NAME)}} and the {{color(#0000ff, WM_CLASS)}} property of a window and not the title. This to ensure the match is correct. 
527 2 Christoph Kappel
There are several ways to get these values, here are the most common:
528 2 Christoph Kappel
529 2 Christoph Kappel
Select the window with "xprop":http://www.xfree86.org/current/xprop.1.htmland have a look for the {{color(#ff0000, WM_NAME)}} and {{color(#0000ff, WM_CLASS)}} lines which usually look like this:
530 2 Christoph Kappel
531 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
532 1 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
533 1 Christoph Kappel
534 2 Christoph Kappel
Run *[[subtler]] -cl* and look for the matching line:
535 2 Christoph Kappel
536 1 Christoph Kappel
<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
537 2 Christoph Kappel
538 3 Christoph Kappel
h2.  How does subtle match clients?
539 3 Christoph Kappel
540 2 Christoph Kappel
[[subtle]] matches the {{color(#ff0000, WM_NAME)}} and the {{color(#0000ff, WM_CLASS)}} property of a window and not the title. This to ensure the match is correct. 
541 2 Christoph Kappel
There are several ways to get these values, here are the most common:
542 2 Christoph Kappel
543 2 Christoph Kappel
Select the window with "xprop":http://www.xfree86.org/current/xprop.1.htmland have a look for the {{color(#ff0000, WM_NAME)}} and {{color(#0000ff, WM_CLASS)}} lines which usually look like this:
544 2 Christoph Kappel
545 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
546 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
547 2 Christoph Kappel
548 1 Christoph Kappel
Run *[[subtler]] -cl* and look for the matching line:
549 2 Christoph Kappel
550 1 Christoph Kappel
<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
551 1 Christoph Kappel
552 3 Christoph Kappel
h2.  How can I use subtle without numpad?
553 3 Christoph Kappel
554 2 Christoph Kappel
Per default [[subtle]] uses the numpad, because it's easier to remind the different postions when you can see them. Generally this is just a suggestion, it's up to you to change the grabs to your needs - any keys will work. 
555 2 Christoph Kappel
556 2 Christoph Kappel
Keys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
557 2 Christoph Kappel
558 2 Christoph Kappel
<pre><code class="ruby">grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
559 2 Christoph Kappel
grab "W-w", [ :top,          :top66,          :top33          ]
560 2 Christoph Kappel
grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
561 2 Christoph Kappel
grab "W-a", [ :left,         :left66,         :left33         ]
562 2 Christoph Kappel
grab "W-s", [ :center,       :center66,       :center33       ]
563 2 Christoph Kappel
grab "W-d", [ :right,        :right66,        :right33        ]
564 2 Christoph Kappel
grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
565 2 Christoph Kappel
grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
566 2 Christoph Kappel
grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
567 2 Christoph Kappel
</code></pre>
568 1 Christoph Kappel
569 2 Christoph Kappel
You can find more about assigning keys [[Grabs|here]].
570 1 Christoph Kappel
571 3 Christoph Kappel
h2.  How do I tag console based programs?
572 3 Christoph Kappel
573 2 Christoph Kappel
Generally [[subtle]] can apply [[Tagging|tags]] based on the {{color(#0000ff, WM_NAME)}} and both {{color(#ff0000, WM_CLASS)}} components. Console based programs like "irssi":http://irssi.org can be started like this and will change the {{color(#0000ff, WM_NAME)}} of the terminal:
574 2 Christoph Kappel
575 2 Christoph Kappel
<pre><code class="bash">urxvt -e irssi</code></pre>
576 2 Christoph Kappel
577 2 Christoph Kappel
Inspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
578 2 Christoph Kappel
579 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
580 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
581 2 Christoph Kappel
582 2 Christoph Kappel
So if we want to tag this window there are some things that should be considered:
583 1 Christoph Kappel
584 1 Christoph Kappel
* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
585 2 Christoph Kappel
* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
586 2 Christoph Kappel
* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
587 2 Christoph Kappel
588 2 Christoph Kappel
To safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
589 2 Christoph Kappel
590 2 Christoph Kappel
<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
591 2 Christoph Kappel
592 2 Christoph Kappel
This results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
593 2 Christoph Kappel
594 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
595 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
596 2 Christoph Kappel
597 2 Christoph Kappel
A [[Tagging|tag]] for this could be:
598 2 Christoph Kappel
599 1 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
600 2 Christoph Kappel
  match "irssi"
601 1 Christoph Kappel
end</code></pre>
602 2 Christoph Kappel
603 2 Christoph Kappel
Please keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
604 2 Christoph Kappel
605 3 Christoph Kappel
h2.  How do I tag console based programs?
606 3 Christoph Kappel
607 2 Christoph Kappel
Generally [[subtle]] can apply [[Tagging|tags]] based on the {{color(#0000ff, WM_NAME)}} and both {{color(#ff0000, WM_CLASS)}} components. Console based programs like "irssi":http://irssi.org can be started like this and will change the {{color(#0000ff, WM_NAME)}} of the terminal:
608 2 Christoph Kappel
609 2 Christoph Kappel
<pre><code class="bash">urxvt -e irssi</code></pre>
610 2 Christoph Kappel
611 2 Christoph Kappel
Inspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
612 2 Christoph Kappel
613 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
614 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
615 2 Christoph Kappel
616 1 Christoph Kappel
So if we want to tag this window there are some things that should be considered:
617 1 Christoph Kappel
618 2 Christoph Kappel
* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
619 2 Christoph Kappel
* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
620 2 Christoph Kappel
* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
621 2 Christoph Kappel
622 2 Christoph Kappel
To safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
623 2 Christoph Kappel
624 2 Christoph Kappel
<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
625 1 Christoph Kappel
626 1 Christoph Kappel
This results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
627 2 Christoph Kappel
628 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
629 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
630 2 Christoph Kappel
631 2 Christoph Kappel
A [[Tagging|tag]] for this could be:
632 2 Christoph Kappel
633 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
634 1 Christoph Kappel
  match :instance => "irssi"
635 2 Christoph Kappel
end</code></pre>
636 1 Christoph Kappel
637 2 Christoph Kappel
Please keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
638 2 Christoph Kappel
639 3 Christoph Kappel
h2.  How do I run a program on startup?
640 3 Christoph Kappel
641 2 Christoph Kappel
Let's say you want urxvt to start after subtle, and for some reason @echo "urxvt" >> ~/.xinitrc@ is just not cutting it. Using the :start hook and Subtlext we can simulate autostart like so:
642 1 Christoph Kappel
643 2 Christoph Kappel
<pre>
644 1 Christoph Kappel
on :start do
645 2 Christoph Kappel
  Subtlext::Subtle.spawn "urxvt"
646 2 Christoph Kappel
end
647 2 Christoph Kappel
</pre>
648 2 Christoph Kappel
649 3 Christoph Kappel
h2.  How can I use subtle without numpad?
650 3 Christoph Kappel
651 1 Christoph Kappel
Per default [[subtle]] uses the numpad, because it's easier to remind the different postions when you can see them. Generally this is just a suggestion, it's up to you to change the grabs to your needs - any keys will work. 
652 2 Christoph Kappel
653 2 Christoph Kappel
Keys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
654 2 Christoph Kappel
655 2 Christoph Kappel
<pre><code class="ruby">grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
656 2 Christoph Kappel
grab "W-w", [ :top,          :top66,          :top33          ]
657 2 Christoph Kappel
grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
658 2 Christoph Kappel
grab "W-a", [ :left,         :left66,         :left33         ]
659 2 Christoph Kappel
grab "W-s", [ :center,       :center66,       :center33       ]
660 2 Christoph Kappel
grab "W-d", [ :right,        :right66,        :right33        ]
661 2 Christoph Kappel
662 2 Christoph Kappel
# QWERTZ
663 2 Christoph Kappel
grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
664 2 Christoph Kappel
665 2 Christoph Kappel
# QWERTY
666 2 Christoph Kappel
grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
667 2 Christoph Kappel
668 1 Christoph Kappel
grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
669 2 Christoph Kappel
grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
670 2 Christoph Kappel
</code></pre>
671 2 Christoph Kappel
672 2 Christoph Kappel
673 2 Christoph Kappel
You can find more about assigning keys [[Grabs|here]].
674 2 Christoph Kappel
675 3 Christoph Kappel
h2.  How do I tag console based programs?
676 3 Christoph Kappel
677 2 Christoph Kappel
Generally [[subtle]] can apply [[Tagging|tags]] based on the {{color(#0000ff, WM_NAME)}} and both {{color(#ff0000, WM_CLASS)}} components. Console based programs like "irssi":http://irssi.org can be started like this and will change the {{color(#0000ff, WM_NAME)}} of the terminal:
678 2 Christoph Kappel
679 2 Christoph Kappel
<pre><code class="bash">urxvt -e irssi</code></pre>
680 2 Christoph Kappel
681 2 Christoph Kappel
Inspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
682 2 Christoph Kappel
683 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
684 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
685 2 Christoph Kappel
686 2 Christoph Kappel
So if we want to tag this window there are some things that should be considered:
687 1 Christoph Kappel
688 1 Christoph Kappel
* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
689 2 Christoph Kappel
* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
690 2 Christoph Kappel
* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
691 2 Christoph Kappel
692 2 Christoph Kappel
To safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
693 2 Christoph Kappel
694 2 Christoph Kappel
<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
695 2 Christoph Kappel
696 2 Christoph Kappel
This results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
697 2 Christoph Kappel
698 1 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
699 1 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
700 2 Christoph Kappel
701 1 Christoph Kappel
A [[Tagging|tag]] for this could be:
702 1 Christoph Kappel
703 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
704 1 Christoph Kappel
  match :instance => "irssi"
705 1 Christoph Kappel
end</code></pre>
706 2 Christoph Kappel
707 2 Christoph Kappel
Please keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too. To avoid that there is the *exclude* match, it works similar to the normal match but excludes certain windows:
708 2 Christoph Kappel
709 1 Christoph Kappel
<pre><code class="ruby">tag "terms" do
710 2 Christoph Kappel
  exclude :instance => "irssi"
711 1 Christoph Kappel
end</code></pre>
712 2 Christoph Kappel
713 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
714 3 Christoph Kappel
715 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those:
716 2 Christoph Kappel
717 2 Christoph Kappel
# Enable size hints globally with the _:resize_ option
718 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
719 2 Christoph Kappel
# Enable this per program via [[tagging|tag]]
720 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
721 1 Christoph Kappel
  match  "name"
722 1 Christoph Kappel
  resize true
723 1 Christoph Kappel
end
724 4 Christoph Kappel
</code></pre>
725 1 Christoph Kappel
726 3 Christoph Kappel
h2.  How can I delete a sublet manually?
727 3 Christoph Kappel
728 1 Christoph Kappel
[[Sublets]] usually consist of a *&#42;.rb* file, a *&#42;.spec* file and one or more icons. All these files can be found in their respective folder in @$XDG_DATA_HOME/subtle@ resp. @~/.local/share/subtle@. After deleting the [[sublets|sublet]] files the cache of [[sur]] needs to be updated or otherwise [[sur]] will think the [[sublets|sublet]] is still installed: @sur update -l@
729 1 Christoph Kappel
730 3 Christoph Kappel
h2.  How can I manually delete a sublet?
731 3 Christoph Kappel
732 1 Christoph Kappel
[[Sublets]] usually consist of a *&#42;.rb* file, a *&#42;.spec* file and one or more icons. All these files can be found in their respective folder in @$XDG_DATA_HOME/subtle@ resp. @~/.local/share/subtle@. After deleting the [[sublets|sublet]] files the cache of [[sur]] needs to be updated or otherwise [[sur]] will think the [[sublets|sublet]] is still installed: @sur update -l@
733 2 Christoph Kappel
734 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
735 3 Christoph Kappel
736 2 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
737 2 Christoph Kappel
738 2 Christoph Kappel
Following names are currently in use:
739 2 Christoph Kappel
740 2 Christoph Kappel
|_. Browser |_. WM_NAME            |_. WM_CLASS                                 |
741 2 Christoph Kappel
| Firefox   | <unknown>            | "<unknown>", "<unknown>"                   |
742 2 Christoph Kappel
| Chromium  | exe                  | "exe", "Exe"                               |
743 2 Christoph Kappel
| Opera     | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
744 2 Christoph Kappel
745 1 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
746 2 Christoph Kappel
747 1 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
748 2 Christoph Kappel
  match "<unkown>|exe|operapluginwrapper"
749 2 Christoph Kappel
  stick true
750 2 Christoph Kappel
end</code></pre>
751 2 Christoph Kappel
752 3 Christoph Kappel
h2.  How do I run a program on startup/autostart?
753 3 Christoph Kappel
754 1 Christoph Kappel
Let's say you want "urxvt":http://software.schmorp.de/pkg/rxvt-unicode.html to start after [[subtle]], and for some reason @echo "urxvt" >> ~/.xinitrc@ is just not cutting it. Using the *&#58;start* hook and [[subtlext]] we can simulate autostart like so:
755 1 Christoph Kappel
756 1 Christoph Kappel
<pre>{{hide}}<code class="ruby">
757 2 Christoph Kappel
on :start do
758 2 Christoph Kappel
  Subtlext::Subtle.spawn "urxvt"
759 2 Christoph Kappel
end
760 2 Christoph Kappel
</pre></code>
761 2 Christoph Kappel
762 3 Christoph Kappel
h2.  How do I start program xyz?
763 3 Christoph Kappel
764 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
765 2 Christoph Kappel
766 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
767 2 Christoph Kappel
768 2 Christoph Kappel
<pre><code class="ruby">
769 2 Christoph Kappel
subtle &
770 2 Christoph Kappel
PID=$!
771 2 Christoph Kappel
sleep 2
772 2 Christoph Kappel
urxvt
773 1 Christoph Kappel
wait $PID
774 2 Christoph Kappel
</code></pre>
775 1 Christoph Kappel
776 1 Christoph Kappel
* Start your program via [[grabs]]:
777 1 Christoph Kappel
778 2 Christoph Kappel
<pre><code class="ruby">
779 2 Christoph Kappel
"A-x" => "urxvt"
780 2 Christoph Kappel
</code></pre>
781 2 Christoph Kappel
782 2 Christoph Kappel
Additionally there are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in "subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.
783 2 Christoph Kappel
784 2 Christoph Kappel
785 3 Christoph Kappel
h2.  How do I start program XYZ?
786 3 Christoph Kappel
787 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
788 1 Christoph Kappel
789 1 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
790 2 Christoph Kappel
791 2 Christoph Kappel
<pre><code class="ruby">
792 2 Christoph Kappel
subtle &
793 2 Christoph Kappel
PID=$!
794 2 Christoph Kappel
sleep 2
795 2 Christoph Kappel
urxvt
796 1 Christoph Kappel
wait $PID
797 2 Christoph Kappel
</code></pre>
798 1 Christoph Kappel
799 2 Christoph Kappel
* Start your program via [[grabs]]:
800 2 Christoph Kappel
801 1 Christoph Kappel
<pre><code class="ruby">
802 1 Christoph Kappel
"A-x" => "urxvt"
803 2 Christoph Kappel
</code></pre>
804 2 Christoph Kappel
805 2 Christoph Kappel
Additionally there are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in "subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.
806 2 Christoph Kappel
807 2 Christoph Kappel
808 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
809 3 Christoph Kappel
810 1 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
811 2 Christoph Kappel
812 2 Christoph Kappel
There are two possible ways:
813 2 Christoph Kappel
814 2 Christoph Kappel
# Enable size hints globally with the _:resize_ option
815 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
816 2 Christoph Kappel
# Enable this per program via [[tagging|tag]]
817 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
818 2 Christoph Kappel
  match  "name"
819 2 Christoph Kappel
  resize true
820 1 Christoph Kappel
end
821 1 Christoph Kappel
822 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
823 3 Christoph Kappel
824 1 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
825 2 Christoph Kappel
826 2 Christoph Kappel
There are two possible ways:
827 2 Christoph Kappel
828 1 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
829 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
830 2 Christoph Kappel
# Enable this per program via [[tagging|tag]]
831 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
832 2 Christoph Kappel
  match  "name"
833 2 Christoph Kappel
  resize true
834 2 Christoph Kappel
end
835 2 Christoph Kappel
836 3 Christoph Kappel
h2.  How do I run a java program?
837 3 Christoph Kappel
838 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
839 2 Christoph Kappel
840 2 Christoph Kappel
If this happens just try to start your program like this:
841 1 Christoph Kappel
842 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
843 1 Christoph Kappel
844 2 Christoph Kappel
This changes the default tookit of "Java":http://java.com to MToolkit, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
845 2 Christoph Kappel
846 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
847 1 Christoph Kappel
848 2 Christoph Kappel
In case both doesn't work there is a third option: The JDK internally uses a hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made the tool "wmname":http://tools.suckless.org/wmname to change the name of the wm and just lie to Java. 
849 1 Christoph Kappel
850 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
851 2 Christoph Kappel
852 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
853 1 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
854 1 Christoph Kappel
855 2 Christoph Kappel
856 1 Christoph Kappel
857 3 Christoph Kappel
h2.  How do I set a wallpaper in subtle?
858 3 Christoph Kappel
859 2 Christoph Kappel
On start, [[subtle]] sets a background color (_if set_) to the root window and therefore *overwrites* any root pixmap set before. To avoid this, you just need to comment out the *&#58;background* line from your config.
860 2 Christoph Kappel
861 2 Christoph Kappel
[[subtle]] itself has no and will never have either an autostart or way to set a wallpaper directly. Normally you just want to setup your X session and and not [[subtle]]. Your _~/.xinitrc_ is the right place for stuff like this.
862 2 Christoph Kappel
863 2 Christoph Kappel
A background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
864 2 Christoph Kappel
865 3 Christoph Kappel
h2.  How can I use subtle without numpad?
866 3 Christoph Kappel
867 2 Christoph Kappel
Per default [[subtle]] uses the numpad, because it's easier to remind the different postions when you can see them. Generally this is just a suggestion, it's up to you to change the grabs to your needs - any keys will work. 
868 1 Christoph Kappel
869 2 Christoph Kappel
Keys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
870 2 Christoph Kappel
871 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
872 2 Christoph Kappel
grab "W-w", [ :top,          :top66,          :top33          ]
873 2 Christoph Kappel
grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
874 2 Christoph Kappel
grab "W-a", [ :left,         :left66,         :left33         ]
875 2 Christoph Kappel
grab "W-s", [ :center,       :center66,       :center33       ]
876 2 Christoph Kappel
grab "W-d", [ :right,        :right66,        :right33        ]
877 1 Christoph Kappel
878 1 Christoph Kappel
# QWERTZ
879 1 Christoph Kappel
grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
880 2 Christoph Kappel
881 1 Christoph Kappel
# QWERTY
882 2 Christoph Kappel
grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
883 1 Christoph Kappel
884 2 Christoph Kappel
grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
885 2 Christoph Kappel
grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
886 2 Christoph Kappel
</code></pre>
887 2 Christoph Kappel
888 2 Christoph Kappel
889 2 Christoph Kappel
You can find more about assigning keys [[Grabs|here]].
890 2 Christoph Kappel
891 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
892 3 Christoph Kappel
893 1 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[tagging]]. There are many ways to change tags per runtime, common is to use either [[subtler]] or [[subtlext]].
894 2 Christoph Kappel
895 3 Christoph Kappel
h2.  subtler
896 2 Christoph Kappel
897 3 Christoph Kappel
898 1 Christoph Kappel
[[subtler]] can be used on the commandline:
899 2 Christoph Kappel
900 1 Christoph Kappel
<pre>{{hide}}<code class="ruby">
901 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
902 1 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
903 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
904 2 Christoph Kappel
</code></pre>
905 2 Christoph Kappel
906 3 Christoph Kappel
h2.  subtlext
907 2 Christoph Kappel
908 3 Christoph Kappel
909 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
910 1 Christoph Kappel
911 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
912 1 Christoph Kappel
913 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
914 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
915 2 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
916 2 Christoph Kappel
</code></pre>
917 2 Christoph Kappel
918 3 Christoph Kappel
h2.  Snippets
919 2 Christoph Kappel
920 3 Christoph Kappel
921 1 Christoph Kappel
The [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
922 2 Christoph Kappel
923 3 Christoph Kappel
h2.  Contrib
924 2 Christoph Kappel
925 3 Christoph Kappel
926 2 Christoph Kappel
h3. Vitag
927 1 Christoph Kappel
928 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains "vitag":http://subforge.org/projects/subtle-contrib/wiki#Vitag, a script to change the [[tagging|tags]] of windows and views with an editor.
929 2 Christoph Kappel
930 2 Christoph Kappel
h3. Launcher
931 2 Christoph Kappel
932 1 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
933 2 Christoph Kappel
934 3 Christoph Kappel
h2.  Stick
935 1 Christoph Kappel
936 3 Christoph Kappel
937 1 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: W-s) or with [[subtler]]. (click on the window: subtler -cXS)
938 2 Christoph Kappel
939 2 Christoph Kappel
940 2 Christoph Kappel
941 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
942 3 Christoph Kappel
943 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via the [[tagging]]. There are many ways to change tags per runtime, common is to use either [[subtler]] or [[subtlext]].
944 1 Christoph Kappel
945 3 Christoph Kappel
h2.  subtler
946 1 Christoph Kappel
947 3 Christoph Kappel
948 2 Christoph Kappel
[[subtler]] can be used on the commandline:
949 2 Christoph Kappel
950 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">
951 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
952 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
953 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
954 1 Christoph Kappel
</code></pre>
955 2 Christoph Kappel
956 3 Christoph Kappel
h2.  subtlext
957 2 Christoph Kappel
958 3 Christoph Kappel
959 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
960 2 Christoph Kappel
961 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
962 2 Christoph Kappel
963 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
964 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
965 1 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
966 2 Christoph Kappel
</code></pre>
967 1 Christoph Kappel
968 3 Christoph Kappel
h2.  Snippets
969 1 Christoph Kappel
970 3 Christoph Kappel
971 1 Christoph Kappel
The [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
972 2 Christoph Kappel
973 3 Christoph Kappel
h2.  Contrib
974 2 Christoph Kappel
975 3 Christoph Kappel
976 2 Christoph Kappel
h3. Vitag
977 2 Christoph Kappel
978 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains "vitag":http://subforge.org/projects/subtle-contrib/wiki#Vitag, a script to change the [[tagging|tags]] of windows and views with an editor.
979 1 Christoph Kappel
980 2 Christoph Kappel
h3. Launcher
981 1 Christoph Kappel
982 2 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
983 2 Christoph Kappel
984 3 Christoph Kappel
h2.  Stick
985 1 Christoph Kappel
986 3 Christoph Kappel
987 2 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: *W-s*) or with [[subtler]]. (click on the window: @subtler -cXS@)
988 2 Christoph Kappel
989 2 Christoph Kappel
990 1 Christoph Kappel
991 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
992 3 Christoph Kappel
993 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via [[tagging]]. There are many ways to change [[tagging|tags]] per runtime, common is to use either [[subtler]] or [[subtlext]].
994 2 Christoph Kappel
995 3 Christoph Kappel
h2.  subtler
996 2 Christoph Kappel
997 3 Christoph Kappel
998 2 Christoph Kappel
[[subtler]] can be used on the commandline:
999 2 Christoph Kappel
1000 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">
1001 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
1002 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
1003 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
1004 2 Christoph Kappel
</code></pre>
1005 2 Christoph Kappel
1006 3 Christoph Kappel
h2.  subtlext
1007 1 Christoph Kappel
1008 3 Christoph Kappel
1009 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
1010 2 Christoph Kappel
1011 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
1012 2 Christoph Kappel
1013 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
1014 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
1015 2 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
1016 2 Christoph Kappel
</code></pre>
1017 2 Christoph Kappel
1018 3 Christoph Kappel
h2.  Snippets
1019 2 Christoph Kappel
1020 3 Christoph Kappel
1021 2 Christoph Kappel
The [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
1022 1 Christoph Kappel
1023 3 Christoph Kappel
h2.  Contrib
1024 2 Christoph Kappel
1025 3 Christoph Kappel
1026 2 Christoph Kappel
h3. Vitag
1027 2 Christoph Kappel
1028 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains "vitag":http://subforge.org/projects/subtle-contrib/wiki#Vitag, a script to change the [[tagging|tags]] of windows and views with an editor.
1029 2 Christoph Kappel
1030 2 Christoph Kappel
h3. Launcher
1031 2 Christoph Kappel
1032 2 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
1033 2 Christoph Kappel
1034 3 Christoph Kappel
h2.  Stick
1035 1 Christoph Kappel
1036 3 Christoph Kappel
1037 1 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: *W-s*) or with [[subtler]]. (click on the window: @subtler -cXS@)
1038 2 Christoph Kappel
1039 2 Christoph Kappel
1040 2 Christoph Kappel
1041 3 Christoph Kappel
h2.  How do I run a java program?
1042 3 Christoph Kappel
1043 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
1044 1 Christoph Kappel
1045 1 Christoph Kappel
If this happens just try to start your program like this:
1046 2 Christoph Kappel
1047 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
1048 2 Christoph Kappel
1049 2 Christoph Kappel
This changes the default tookit of "Java":http://java.com to _MToolkit_, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
1050 2 Christoph Kappel
1051 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
1052 2 Christoph Kappel
1053 2 Christoph Kappel
In case both doesn't work there is a third option: The JDK internally uses a hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made the tool "wmname":http://tools.suckless.org/wmname to change the name of the wm and just lie to Java. 
1054 2 Christoph Kappel
1055 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
1056 1 Christoph Kappel
1057 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
1058 1 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
1059 1 Christoph Kappel
1060 1 Christoph Kappel
bq. Note: Many problems only affect the "JRE":http://www.oracle.com/technetwork/java/javase/downloads/index.html and can be avoided by using the "OpenJDK":http://openjdk.java.net.
1061 2 Christoph Kappel
1062 2 Christoph Kappel
1063 2 Christoph Kappel
1064 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
1065 3 Christoph Kappel
1066 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
1067 2 Christoph Kappel
1068 2 Christoph Kappel
There are two possible ways:
1069 2 Christoph Kappel
1070 2 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
1071 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
1072 1 Christoph Kappel
# Enable this per program via [[tagging|tag]]
1073 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
1074 1 Christoph Kappel
  match  "name"
1075 1 Christoph Kappel
  resize true
1076 2 Christoph Kappel
end
1077 1 Christoph Kappel
1078 1 Christoph Kappel
.bq Note: This can happen with "java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
1079 2 Christoph Kappel
1080 3 Christoph Kappel
h2.  How do I run a Java program?
1081 3 Christoph Kappel
1082 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
1083 2 Christoph Kappel
1084 2 Christoph Kappel
If this happens just try to start your program like this:
1085 2 Christoph Kappel
1086 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
1087 2 Christoph Kappel
1088 2 Christoph Kappel
This changes the default tookit of "Java":http://java.com to _MToolkit_, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
1089 2 Christoph Kappel
1090 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
1091 2 Christoph Kappel
1092 2 Christoph Kappel
In case both doesn't work there is a third option: The JDK internally uses a hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made the tool "wmname":http://tools.suckless.org/wmname to change the name of the wm and just lie to Java. 
1093 2 Christoph Kappel
1094 1 Christoph Kappel
Generally this problem is really long lasting, see here: 
1095 2 Christoph Kappel
1096 1 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
1097 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
1098 2 Christoph Kappel
1099 1 Christoph Kappel
bq. Note: Many problems only affect the "JRE":http://www.oracle.com/technetwork/java/javase/downloads/index.html and can be avoided by using the "OpenJDK":http://openjdk.java.net.
1100 1 Christoph Kappel
1101 2 Christoph Kappel
1102 2 Christoph Kappel
1103 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
1104 3 Christoph Kappel
1105 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
1106 2 Christoph Kappel
1107 2 Christoph Kappel
There are two possible ways:
1108 2 Christoph Kappel
1109 2 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
1110 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
1111 2 Christoph Kappel
# Enable this per program via [[tagging|tag]]
1112 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
1113 2 Christoph Kappel
  match  "name"
1114 2 Christoph Kappel
  resize true
1115 2 Christoph Kappel
end</code></pre>
1116 2 Christoph Kappel
1117 2 Christoph Kappel
bq. Note: This can happen with "java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
1118 2 Christoph Kappel
1119 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
1120 3 Christoph Kappel
1121 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
1122 2 Christoph Kappel
1123 1 Christoph Kappel
There are two possible ways:
1124 1 Christoph Kappel
1125 1 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
1126 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
1127 1 Christoph Kappel
# Enable this per program via [[tagging|tag]]
1128 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name"
1129 1 Christoph Kappel
  match  "name"
1130 2 Christoph Kappel
  resize true
1131 2 Christoph Kappel
end</code></pre>
1132 2 Christoph Kappel
1133 2 Christoph Kappel
bq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
1134 2 Christoph Kappel
1135 3 Christoph Kappel
h2.  Is there any log file?
1136 3 Christoph Kappel
1137 2 Christoph Kappel
Nope, there is *no* log file. In case you need one for e.g. reporting a bug +please+ read to the [[bugs|reporting a bug]] wiki page and check the paragraph about [[bugs#enable-logging|logging]].
1138 2 Christoph Kappel
1139 3 Christoph Kappel
h2.  How do I run a Java program?
1140 3 Christoph Kappel
1141 1 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
1142 2 Christoph Kappel
1143 2 Christoph Kappel
If this happens just try to start your program like this:
1144 2 Christoph Kappel
1145 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
1146 2 Christoph Kappel
1147 1 Christoph Kappel
This changes the default tookit of "Java":http://java.com to _MToolkit_, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
1148 1 Christoph Kappel
1149 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
1150 2 Christoph Kappel
1151 2 Christoph Kappel
In case both doesn't work there is a third option: "Java":http://java.com seems to use an internally hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made a tool ("wmname":http://tools.suckless.org/wmname) to change the name of the wm. Since r2520 [[subtle]] can do that for you, just enable the *&#58;wmname* option.
1152 2 Christoph Kappel
1153 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
1154 2 Christoph Kappel
1155 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
1156 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
1157 2 Christoph Kappel
1158 1 Christoph Kappel
bq. Note: Many problems only affect the "JRE":http://www.oracle.com/technetwork/java/javase/downloads/index.html and can be avoided by using the "OpenJDK":http://openjdk.java.net.
1159 1 Christoph Kappel
1160 2 Christoph Kappel
1161 2 Christoph Kappel
1162 3 Christoph Kappel
h2.  How do I run a Java program?
1163 3 Christoph Kappel
1164 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
1165 2 Christoph Kappel
1166 2 Christoph Kappel
If this happens just try to start your program like this:
1167 2 Christoph Kappel
1168 2 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
1169 1 Christoph Kappel
1170 2 Christoph Kappel
This changes the default tookit of "Java":http://java.com to _MToolkit_, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
1171 1 Christoph Kappel
1172 2 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
1173 2 Christoph Kappel
1174 2 Christoph Kappel
In case both doesn't work there is a third option: "Java":http://java.com seems to use an internally hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made a tool ("wmname":http://tools.suckless.org/wmname) to change the name of the wm.
1175 2 Christoph Kappel
1176 1 Christoph Kappel
Since r2520 [[subtle]] can do that for you, just enable the *&#58;wmname* option.
1177 1 Christoph Kappel
1178 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
1179 2 Christoph Kappel
1180 2 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
1181 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
1182 2 Christoph Kappel
1183 2 Christoph Kappel
bq. Note: Many problems only affect the "JRE":http://www.oracle.com/technetwork/java/javase/downloads/index.html and can be avoided by using the "OpenJDK":http://openjdk.java.net.
1184 2 Christoph Kappel
1185 1 Christoph Kappel
1186 2 Christoph Kappel
1187 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
1188 3 Christoph Kappel
1189 1 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
1190 1 Christoph Kappel
1191 2 Christoph Kappel
Following names are currently in use:
1192 1 Christoph Kappel
1193 2 Christoph Kappel
|_. Browser |_. WM_NAME            |_. WM_CLASS                                 |
1194 1 Christoph Kappel
| Firefox   | <unknown>            | "<unknown>", "<unknown>"                   |
1195 2 Christoph Kappel
| Chromium  | exe                  | "exe", "Exe"                               |
1196 2 Christoph Kappel
| Opera     | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
1197 2 Christoph Kappel
1198 2 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
1199 2 Christoph Kappel
1200 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
1201 2 Christoph Kappel
  match "<unknown>|exe|operapluginwrapper"
1202 1 Christoph Kappel
  stick true
1203 2 Christoph Kappel
end</code></pre>
1204 1 Christoph Kappel
1205 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
1206 3 Christoph Kappel
1207 2 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
1208 1 Christoph Kappel
1209 2 Christoph Kappel
Following names are currently in use:
1210 1 Christoph Kappel
1211 2 Christoph Kappel
|_. Browser       |_. Arch   |_. WM_NAME            |_. WM_CLASS                                 |
1212 2 Christoph Kappel
| Firefox         | x86      | <unknown>            | "<unknown>", "<unknown>"                   |
1213 1 Christoph Kappel
| Chromium        | x86      | exe                  | "exe", "Exe"                               |
1214 2 Christoph Kappel
| Opera           | x86      | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
1215 1 Christoph Kappel
| nspluginwrapper | x86_64   | "npviewer.bin"       | "Npviewer.bin"                             |
1216 2 Christoph Kappel
1217 1 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
1218 2 Christoph Kappel
1219 1 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
1220 2 Christoph Kappel
  match "<unknown>|exe|operapluginwrapper"
1221 2 Christoph Kappel
  stick true
1222 2 Christoph Kappel
end</code></pre>
1223 2 Christoph Kappel
1224 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
1225 3 Christoph Kappel
1226 2 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
1227 1 Christoph Kappel
1228 2 Christoph Kappel
Following names are currently in use:
1229 1 Christoph Kappel
1230 2 Christoph Kappel
|_. Browser       |_. Arch   |_. WM_NAME            |_. WM_CLASS                                 |
1231 1 Christoph Kappel
| Firefox         | x86      | <unknown>            | "<unknown>", "<unknown>"                   |
1232 2 Christoph Kappel
| Chromium        | x86      | exe                  | "exe", "Exe"                               |
1233 1 Christoph Kappel
| Opera           | x86      | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
1234 1 Christoph Kappel
| nspluginwrapper | x86_64   | "npviewer.bin"       | "Npviewer.bin"                             |
1235 2 Christoph Kappel
1236 2 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
1237 2 Christoph Kappel
1238 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
1239 2 Christoph Kappel
  match "<unknown>|exe|operapluginwrapper|npviewer.bin"
1240 2 Christoph Kappel
  stick true
1241 2 Christoph Kappel
end</code></pre>
1242 1 Christoph Kappel
1243 3 Christoph Kappel
h2.  What is required for the volume sublet?
1244 3 Christoph Kappel
1245 2 Christoph Kappel
The volume [[sublets|sublet]] uses @/dev/mixer@ to set/get the volume levels, which is an older interface introduced with "OSS":http://www.opensound.com/ and still available via "ALSA OSS emulation":http://www.alsa-project.org/. Apparently, newer kernels refuse to autoload that module anymore and you need to load it manually or via any init file.
1246 2 Christoph Kappel
1247 1 Christoph Kappel
{{info(Please check to the docs of your distribution how to do it.)}}
1248 2 Christoph Kappel
1249 1 Christoph Kappel
<pre><code>modprobe snd_mixer_oss</code></pre>
1250 2 Christoph Kappel
1251 2 Christoph Kappel
{{warn(Following explanation is technical!)}}
1252 2 Christoph Kappel
1253 2 Christoph Kappel
The [[sublets|sublet]] needs a way to access a mixer without any asynchronous callbacks. The reason for that is that [[subtle]] is single-threaded and can't use a dedicated thread to wait for the reply, but the APIs of "ALSA":http://www.alsa-project.org/ and "PulseAudio":http://pulseaudio.org are both designed to be asynchronous. Normally event drivven is fine but it is troublesome when you can't use their mainloop.
1254 2 Christoph Kappel
1255 2 Christoph Kappel
Since there is no way to add e.g. a control socket to the event main loop of [[subtle]], the @/dev/mixer@ approach is the only way and works for all sound systems.
1256 2 Christoph Kappel
1257 3 Christoph Kappel
h2.  How do I move program xyz to view abc?
1258 3 Christoph Kappel
1259 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via [[tagging]]. There are many ways to change [[tagging|tags]] per runtime, common is to use either [[subtler]] or [[subtlext]].
1260 2 Christoph Kappel
1261 3 Christoph Kappel
h2.  subtler
1262 2 Christoph Kappel
1263 3 Christoph Kappel
1264 2 Christoph Kappel
[[subtler]] can be used on the commandline:
1265 2 Christoph Kappel
1266 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">
1267 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
1268 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
1269 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
1270 2 Christoph Kappel
</code></pre>
1271 2 Christoph Kappel
1272 3 Christoph Kappel
h2.  subtlext
1273 2 Christoph Kappel
1274 3 Christoph Kappel
1275 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
1276 2 Christoph Kappel
1277 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
1278 2 Christoph Kappel
1279 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
1280 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
1281 2 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
1282 1 Christoph Kappel
</code></pre>
1283 1 Christoph Kappel
1284 3 Christoph Kappel
h2.  Snippets
1285 1 Christoph Kappel
1286 3 Christoph Kappel
1287 1 Christoph Kappel
The [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
1288 2 Christoph Kappel
1289 3 Christoph Kappel
h2.  Contrib
1290 2 Christoph Kappel
1291 3 Christoph Kappel
1292 2 Christoph Kappel
h3. Vitag
1293 2 Christoph Kappel
1294 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains [[subtle-contrib:vitag|vitag]] a script to change the [[tagging|tags]] of windows and views with an editor.
1295 2 Christoph Kappel
1296 1 Christoph Kappel
h3. Launcher
1297 1 Christoph Kappel
1298 2 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
1299 1 Christoph Kappel
1300 3 Christoph Kappel
h2.  Stick
1301 1 Christoph Kappel
1302 3 Christoph Kappel
1303 1 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: *W-s*) or with [[subtler]]. (click on the window: @subtler -cXS@)
1304 1 Christoph Kappel
1305 1 Christoph Kappel
1306 2 Christoph Kappel
1307 3 Christoph Kappel
h2.  Where does sur store sublets and icons?
1308 3 Christoph Kappel
1309 2 Christoph Kappel
[[sur]] follows the "XDG Base Directory specifications":http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html to store data, which includes some base path for specific data types.
1310 1 Christoph Kappel
1311 1 Christoph Kappel
Following paths are used:
1312 2 Christoph Kappel
1313 2 Christoph Kappel
|_. Type  |_. XDG path                    |_. Default path                |
1314 1 Christoph Kappel
| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
1315 1 Christoph Kappel
| Icons   | @$XDG_DATA_HOME/subtle(icons@   | @~/.local/share/subtle/icons@   |
1316 1 Christoph Kappel
1317 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
1318 3 Christoph Kappel
1319 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
1320 1 Christoph Kappel
1321 1 Christoph Kappel
There are two possible ways:
1322 2 Christoph Kappel
1323 1 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
1324 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
1325 1 Christoph Kappel
# Enable this per program via [[tagging|tag]]
1326 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name" do
1327 2 Christoph Kappel
  match  "name"
1328 2 Christoph Kappel
  resize true
1329 2 Christoph Kappel
end</code></pre>
1330 2 Christoph Kappel
1331 2 Christoph Kappel
bq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
1332 2 Christoph Kappel
1333 3 Christoph Kappel
h2.  How can I use subtle without numpad?
1334 3 Christoph Kappel
1335 1 Christoph Kappel
Per default [[subtle]] uses the numpad, because it's easier to remind the different postions when you can see them. Generally this is just a suggestion, it's up to you to change the grabs to your needs - any keys will work. 
1336 2 Christoph Kappel
1337 1 Christoph Kappel
Keys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
1338 2 Christoph Kappel
1339 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
1340 2 Christoph Kappel
grab "W-w", [ :top,          :top66,          :top33          ]
1341 2 Christoph Kappel
grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
1342 2 Christoph Kappel
grab "W-a", [ :left,         :left66,         :left33         ]
1343 2 Christoph Kappel
grab "W-s", [ :center,       :center66,       :center33       ]
1344 1 Christoph Kappel
grab "W-d", [ :right,        :right66,        :right33        ]
1345 2 Christoph Kappel
1346 1 Christoph Kappel
# QWERTZ
1347 2 Christoph Kappel
grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
1348 1 Christoph Kappel
1349 2 Christoph Kappel
# QWERTY
1350 1 Christoph Kappel
grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
1351 2 Christoph Kappel
1352 2 Christoph Kappel
grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
1353 2 Christoph Kappel
grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
1354 2 Christoph Kappel
</code></pre>
1355 2 Christoph Kappel
1356 2 Christoph Kappel
1357 2 Christoph Kappel
You can find more about assigning keys [[Grabs|here]].
1358 1 Christoph Kappel
1359 3 Christoph Kappel
h2.  What is the difference between ViewSwitch and ViewJump?
1360 3 Christoph Kappel
1361 2 Christoph Kappel
Boths keys change the [[view]] of the current active [[screens|screen]], but the behavior how they do that depends on if the system consists either of a single [[screens|screen]] or more.
1362 2 Christoph Kappel
1363 3 Christoph Kappel
h2.  Single screen
1364 1 Christoph Kappel
1365 3 Christoph Kappel
1366 1 Christoph Kappel
Here both [[grabs]] do +exactly+ the same.
1367 2 Christoph Kappel
1368 3 Christoph Kappel
h2.  Multi screen
1369 2 Christoph Kappel
1370 3 Christoph Kappel
1371 2 Christoph Kappel
Here the behavior depends of the select [[views|view]] is visible on another screen or not.
1372 2 Christoph Kappel
1373 2 Christoph Kappel
* *ViewSwitch* either swaps the current [[views|view]] with the selected if it is visible on another [[screens|screen]] or just sets the selected [[views|view]] on current [[screens|screen]].
1374 2 Christoph Kappel
* *ViewJump* either focus the selected [[views|view]] if it is visible on another screen or just sets the select view on current [[screens|screen]].
1375 2 Christoph Kappel
1376 3 Christoph Kappel
h2.  What is the difference between ViewSwitch and ViewJump?
1377 3 Christoph Kappel
1378 2 Christoph Kappel
Boths keys change the [[view]] of the current active [[screens|screen]], but the behavior how they do that depends on if the system consists either of a single [[screens|screen]] or more.
1379 2 Christoph Kappel
1380 3 Christoph Kappel
h2.  Single screen
1381 2 Christoph Kappel
1382 3 Christoph Kappel
1383 2 Christoph Kappel
Here both [[grabs]] do +exactly+ the same.
1384 2 Christoph Kappel
1385 3 Christoph Kappel
h2.  Multi screen
1386 1 Christoph Kappel
1387 3 Christoph Kappel
1388 2 Christoph Kappel
Here the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
1389 2 Christoph Kappel
1390 2 Christoph Kappel
* *ViewSwitch* either swaps the current [[views|view]] with the selected if it is visible on another [[screens|screen]] or just sets the selected [[views|view]] on current [[screens|screen]].
1391 2 Christoph Kappel
* *ViewJump* either focus the selected [[views|view]] if it is visible on another [[screens|screen]] or just sets the select [[views|view]] on current [[screens|screen]].
1392 2 Christoph Kappel
1393 3 Christoph Kappel
h2.  Why does subtle cause to many wakeups?
1394 3 Christoph Kappel
1395 1 Christoph Kappel
The wakeups are caused by a "Ruby":http://ruby-lang.org internal polling thread that runs every 10ms to schedule/handle other threads and signals. There is currently no way to avoid that in "YARV":http://www.atdot.net/yarv/, although the problem is well known.
1396 2 Christoph Kappel
1397 2 Christoph Kappel
http://www.ruby-forum.com/topic/200147
1398 1 Christoph Kappel
1399 3 Christoph Kappel
h2.  How do I tag gimp?
1400 3 Christoph Kappel
1401 2 Christoph Kappel
[[Tagging]] "GIMP":http://gimp.org can be nasty, because the current version (2.6) uses inconsistent window names and roles. The window roles are fixed in the current development snapshot and will hopefully find their way into the 2.8 release.
1402 2 Christoph Kappel
1403 1 Christoph Kappel
https://bugzilla.gnome.org/show_bug.cgi?id=645456
1404 2 Christoph Kappel
1405 3 Christoph Kappel
h2.  How do I move a program to another view?
1406 3 Christoph Kappel
1407 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via [[tagging]]. There are many ways to change [[tagging|tags]] per runtime, common is to use either [[subtler]] or [[subtlext]].
1408 2 Christoph Kappel
1409 3 Christoph Kappel
h2.  subtler
1410 2 Christoph Kappel
1411 3 Christoph Kappel
1412 1 Christoph Kappel
[[subtler]] can be used on the commandline:
1413 2 Christoph Kappel
1414 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">
1415 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
1416 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
1417 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
1418 2 Christoph Kappel
</code></pre>
1419 2 Christoph Kappel
1420 3 Christoph Kappel
h2.  subtlext
1421 2 Christoph Kappel
1422 3 Christoph Kappel
1423 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
1424 2 Christoph Kappel
1425 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
1426 2 Christoph Kappel
1427 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
1428 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
1429 2 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
1430 2 Christoph Kappel
</code></pre>
1431 2 Christoph Kappel
1432 3 Christoph Kappel
h2.  Snippets
1433 2 Christoph Kappel
1434 3 Christoph Kappel
1435 2 Christoph Kappel
The [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
1436 2 Christoph Kappel
1437 3 Christoph Kappel
h2.  Contrib
1438 2 Christoph Kappel
1439 3 Christoph Kappel
1440 1 Christoph Kappel
h3. Vitag
1441 1 Christoph Kappel
1442 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains [[subtle-contrib:vitag|vitag]] a script to change the [[tagging|tags]] of windows and views with an editor.
1443 2 Christoph Kappel
1444 2 Christoph Kappel
h3. Launcher
1445 2 Christoph Kappel
1446 2 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
1447 2 Christoph Kappel
1448 3 Christoph Kappel
h2.  Stick
1449 1 Christoph Kappel
1450 3 Christoph Kappel
1451 1 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: *W-s*) or with [[subtler]]. (click on the window: @subtler -cXS@)
1452 2 Christoph Kappel
1453 2 Christoph Kappel
1454 2 Christoph Kappel
1455 3 Christoph Kappel
h2.  How do I start a program?
1456 3 Christoph Kappel
1457 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
1458 2 Christoph Kappel
1459 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
1460 2 Christoph Kappel
1461 2 Christoph Kappel
<pre><code class="ruby">
1462 2 Christoph Kappel
subtle &
1463 2 Christoph Kappel
PID=$!
1464 2 Christoph Kappel
sleep 2
1465 2 Christoph Kappel
urxvt
1466 2 Christoph Kappel
wait $PID
1467 2 Christoph Kappel
</code></pre>
1468 2 Christoph Kappel
1469 1 Christoph Kappel
* Start your program via [[grabs]]:
1470 1 Christoph Kappel
1471 1 Christoph Kappel
<pre><code class="ruby">
1472 2 Christoph Kappel
"A-x" => "urxvt"
1473 1 Christoph Kappel
</code></pre>
1474 2 Christoph Kappel
1475 2 Christoph Kappel
There are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in [[subtle-contrib:Launcher|here]].
1476 2 Christoph Kappel
1477 2 Christoph Kappel
1478 3 Christoph Kappel
h2.  How do I tag console based programs?
1479 3 Christoph Kappel
1480 2 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] just uses both of the {{color(#ff0000, WM_CLASS)}} values for tagging.
1481 2 Christoph Kappel
1482 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1483 2 Christoph Kappel
1484 2 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the {{color(#ff0000, WM_CLASS)}} and may match other [[tagging|tags]].
1485 2 Christoph Kappel
1486 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. 
1487 2 Christoph Kappel
1488 2 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
1489 2 Christoph Kappel
1490 2 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
1491 2 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
1492 2 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
1493 1 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
1494 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
1495 2 Christoph Kappel
1496 2 Christoph Kappel
So the easiest way to reliable match this client is a [[lagging|tag]] like this:
1497 2 Christoph Kappel
1498 1 Christoph Kappel
<pre>code class="ruby">tag "irssi" do
1499 1 Christoph Kappel
  match :instance => "irssi"
1500 2 Christoph Kappel
end</code></pre>
1501 2 Christoph Kappel
1502 2 Christoph Kappel
1503 2 Christoph Kappel
1504 3 Christoph Kappel
h2.  How do I tag console based programs?
1505 3 Christoph Kappel
1506 2 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] just uses both of the *WM_CLASS* values for tagging.
1507 2 Christoph Kappel
1508 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1509 1 Christoph Kappel
1510 1 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
1511 2 Christoph Kappel
1512 2 Christoph Kappel
<pre><code class="ruby">tag "terms" do
1513 2 Christoph Kappel
  match "urxvt"
1514 2 Christoph Kappel
end</code></pre>
1515 2 Christoph Kappel
1516 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. 
1517 2 Christoph Kappel
1518 2 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
1519 2 Christoph Kappel
1520 2 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
1521 2 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
1522 1 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
1523 1 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
1524 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
1525 1 Christoph Kappel
1526 1 Christoph Kappel
So the easiest way to reliable match this client is a [[lagging|tag]] like this:
1527 2 Christoph Kappel
1528 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
1529 2 Christoph Kappel
  match :instance => "irssi"
1530 2 Christoph Kappel
end</code></pre>
1531 2 Christoph Kappel
1532 2 Christoph Kappel
1533 2 Christoph Kappel
1534 3 Christoph Kappel
h2.  How do I tag console based programs?
1535 3 Christoph Kappel
1536 1 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] just uses both of the *WM_CLASS* values for tagging.
1537 2 Christoph Kappel
1538 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1539 2 Christoph Kappel
1540 2 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
1541 2 Christoph Kappel
1542 2 Christoph Kappel
<pre><code class="ruby">tag "terms" do
1543 2 Christoph Kappel
  match "urxvt"
1544 2 Christoph Kappel
end</code></pre>
1545 2 Christoph Kappel
1546 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. So the easiest way to reliable match this client is a [[tagging|tag]] like this:
1547 2 Christoph Kappel
1548 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
1549 2 Christoph Kappel
  match :instance => "irssi"
1550 2 Christoph Kappel
end</code></pre>
1551 2 Christoph Kappel
1552 2 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
1553 1 Christoph Kappel
1554 1 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
1555 2 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
1556 2 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
1557 2 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
1558 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
1559 2 Christoph Kappel
1560 2 Christoph Kappel
1561 2 Christoph Kappel
1562 2 Christoph Kappel
1563 2 Christoph Kappel
1564 3 Christoph Kappel
h2.  How do I tag console based programs?
1565 3 Christoph Kappel
1566 1 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] uses both of the *WM_CLASS* values for tagging.
1567 2 Christoph Kappel
1568 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1569 2 Christoph Kappel
1570 2 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
1571 2 Christoph Kappel
1572 1 Christoph Kappel
<pre><code class="ruby">tag "terms" do
1573 1 Christoph Kappel
  match "urxvt"
1574 2 Christoph Kappel
end</code></pre>
1575 2 Christoph Kappel
1576 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. So the easiest way to reliable match this client is a [[tagging|tag]] like this:
1577 2 Christoph Kappel
1578 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
1579 1 Christoph Kappel
  match :instance => "irssi"
1580 1 Christoph Kappel
end</code></pre>
1581 2 Christoph Kappel
1582 2 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
1583 1 Christoph Kappel
1584 2 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
1585 1 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
1586 2 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
1587 2 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
1588 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
1589 2 Christoph Kappel
1590 2 Christoph Kappel
1591 2 Christoph Kappel
1592 2 Christoph Kappel
1593 2 Christoph Kappel
1594 3 Christoph Kappel
h2.  Why did the volume sublet stop working after kernel update?
1595 3 Christoph Kappel
1596 1 Christoph Kappel
The volume [[sublets|sublet]] uses @/dev/mixer@ to set/get the volume levels, which is an older interface introduced with "OSS":http://www.opensound.com/ and still available via "ALSA OSS emulation":http://www.alsa-project.org/. Apparently, newer kernels refuse to autoload that module anymore and you need to load it manually or via any init file.
1597 2 Christoph Kappel
1598 1 Christoph Kappel
{{info(Please check to the docs of your distribution how to do it.)}}
1599 1 Christoph Kappel
1600 2 Christoph Kappel
{{warn(Following explanation is technical!)}}
1601 2 Christoph Kappel
1602 2 Christoph Kappel
The [[sublets|sublet]] needs a way to access a mixer without any asynchronous callbacks. The reason for that is that [[subtle]] is single-threaded and can't use a dedicated thread to wait for the reply, but the APIs of "ALSA":http://www.alsa-project.org/ and "PulseAudio":http://pulseaudio.org are both designed to be asynchronous. Normally event drivven is fine but it is troublesome when you can't use their mainloop.
1603 2 Christoph Kappel
1604 2 Christoph Kappel
Since there is no way to add e.g. a control socket to the event main loop of [[subtle]], the @/dev/mixer@ approach is the only way and works for all sound systems.
1605 2 Christoph Kappel
1606 3 Christoph Kappel
h2.  Why did the volume sublet stop working after kernel update?
1607 3 Christoph Kappel
1608 1 Christoph Kappel
The volume [[sublets|sublet]] uses @/dev/mixer@ to set/get the volume levels, which is an older interface introduced with "OSS":http://www.opensound.com/ and still available via "ALSA OSS emulation":http://www.alsa-project.org/. Apparently, newer kernels refuse to autoload that module anymore and you need to load it manually or via any init file.
1609 2 Christoph Kappel
1610 2 Christoph Kappel
{{info(Please check to the docs of your distribution how to do it.)}}
1611 2 Christoph Kappel
1612 2 Christoph Kappel
<pre><code>modprobe snd_mixer_oss</code></pre>
1613 2 Christoph Kappel
1614 2 Christoph Kappel
{{warn(Following explanation is technical!)}}
1615 2 Christoph Kappel
1616 2 Christoph Kappel
The [[sublets|sublet]] needs a way to access a mixer without any asynchronous callbacks. The reason for that is that [[subtle]] is single-threaded and can't use a dedicated thread to wait for the reply, but the APIs of "ALSA":http://www.alsa-project.org/ and "PulseAudio":http://pulseaudio.org are both designed to be asynchronous. Normally event drivven is fine but it is troublesome when you can't use their mainloop.
1617 2 Christoph Kappel
1618 1 Christoph Kappel
Since there is no way to add e.g. a control socket to the event main loop of [[subtle]], the @/dev/mixer@ approach is the only way and works for all sound systems.
1619 2 Christoph Kappel
1620 3 Christoph Kappel
h2.  Is subtle a reparenting window manager?
1621 3 Christoph Kappel
1622 1 Christoph Kappel
*Nope*, [[subtle]] doesn't reparent windows and there is in fact *no* reason to do that. The layout in [[subtle]] is a really loose set, the only relation between a [[views|view]] and a [[client]] is [[tagging]] and this is checked on every [[views|view]] update.
1623 2 Christoph Kappel
1624 2 Christoph Kappel
Reparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
1625 2 Christoph Kappel
1626 2 Christoph Kappel
# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
1627 2 Christoph Kappel
# Reparent the [[client]] window to the toplevel window
1628 2 Christoph Kappel
# Handle (ignore here) the generated expose and crossing events
1629 2 Christoph Kappel
1630 2 Christoph Kappel
Probably sounds like not much overhead, but keep in mind this is just required because the developer of "Java":http://www.java.com/ and "Qt":http://qt.nokia.com/products/ cannot understand following line from the "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:
1631 2 Christoph Kappel
1632 2 Christoph Kappel
bq. Clients must be aware that some window managers will reparent their top-level windows so that a window that was created as a child of the root will be displayed as a child of some window belonging to the window manager
1633 2 Christoph Kappel
1634 3 Christoph Kappel
h2.  How do I tag console based programs?
1635 3 Christoph Kappel
1636 2 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] uses both of the *WM_CLASS* values for tagging.
1637 2 Christoph Kappel
1638 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1639 2 Christoph Kappel
1640 2 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
1641 2 Christoph Kappel
1642 1 Christoph Kappel
<pre><code class="ruby">tag "terms" do
1643 1 Christoph Kappel
  match "urxvt"
1644 2 Christoph Kappel
end</code></pre>
1645 2 Christoph Kappel
1646 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. So the easiest way to reliable match this client is a [[tagging|tag]] like this:
1647 2 Christoph Kappel
1648 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
1649 2 Christoph Kappel
  match :instance => "irssi"
1650 1 Christoph Kappel
end</code></pre>
1651 2 Christoph Kappel
1652 1 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
1653 2 Christoph Kappel
1654 1 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
1655 1 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
1656 2 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
1657 2 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
1658 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
1659 1 Christoph Kappel
1660 2 Christoph Kappel
Please have a look at the [[Tagging|tagging wiki page]] for more information.
1661 1 Christoph Kappel
1662 2 Christoph Kappel
1663 2 Christoph Kappel
1664 2 Christoph Kappel
1665 3 Christoph Kappel
h2.  Why does subtle cause to many wakeups?
1666 3 Christoph Kappel
1667 1 Christoph Kappel
The wakeups are caused by a "Ruby":http://ruby-lang.org internal polling thread that runs every 10ms to schedule/handle other threads and signals. There is currently no way to avoid that in "YARV":http://www.atdot.net/yarv/, although the problem is well known.
1668 1 Christoph Kappel
1669 2 Christoph Kappel
http://www.ruby-forum.com/topic/200147
1670 1 Christoph Kappel
1671 2 Christoph Kappel
There is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
1672 2 Christoph Kappel
1673 3 Christoph Kappel
h2.  Why don't my grabs work with xyz keyboard layout?
1674 3 Christoph Kappel
1675 2 Christoph Kappel
Actually, I have no idea why setting the keyboard layout in your @xorg.conf@ isn't suffucient, but apparently you need to call *setxkbmap* in one of your startup files to set the keymap. My suggestion is to use the @~/.xinitrc@, because it is perfectly suited to setup Xorg and usually read.
1676 2 Christoph Kappel
1677 2 Christoph Kappel
Just add something like this to your @~/.xinitrc@ *before* you start [[subtle]]: 
1678 1 Christoph Kappel
1679 1 Christoph Kappel
<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
1680 2 Christoph Kappel
1681 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
1682 3 Christoph Kappel
1683 2 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
1684 2 Christoph Kappel
1685 1 Christoph Kappel
Following names are currently in use:
1686 1 Christoph Kappel
1687 2 Christoph Kappel
|_. Browser       |_. Arch   |_. WM_NAME            |_. WM_CLASS                                 |
1688 1 Christoph Kappel
| Firefox <7.0.1  | all      | <unknown>            | "<unknown>", "<unknown>"                   |
1689 1 Christoph Kappel
| Firefox >=7.0.1 | all      | plugin-container     | "plugin-container", "Plugin-container"     |
1690 2 Christoph Kappel
| Chromium        | all      | exe                  | "exe", "Exe"                               |
1691 2 Christoph Kappel
| Opera           | x86      | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
1692 1 Christoph Kappel
| nspluginwrapper | x86_64   | "npviewer.bin"       | "Npviewer.bin"                             |
1693 2 Christoph Kappel
1694 1 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
1695 2 Christoph Kappel
1696 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
1697 2 Christoph Kappel
  match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
1698 2 Christoph Kappel
  stick true
1699 2 Christoph Kappel
end</code></pre>
1700 2 Christoph Kappel
1701 3 Christoph Kappel
h2.  How do I (auto)start applications?
1702 3 Christoph Kappel
1703 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
1704 2 Christoph Kappel
1705 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
1706 2 Christoph Kappel
1707 2 Christoph Kappel
<pre><code class="ruby">
1708 2 Christoph Kappel
subtle &
1709 2 Christoph Kappel
PID=$!
1710 1 Christoph Kappel
sleep 2
1711 1 Christoph Kappel
urxvt
1712 2 Christoph Kappel
wait $PID
1713 2 Christoph Kappel
</code></pre>
1714 1 Christoph Kappel
1715 1 Christoph Kappel
* Start your program via [[grabs]]:
1716 1 Christoph Kappel
1717 2 Christoph Kappel
<pre><code class="ruby">
1718 1 Christoph Kappel
"A-x" => "urxvt"
1719 2 Christoph Kappel
</code></pre>
1720 2 Christoph Kappel
1721 2 Christoph Kappel
There are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in [[subtle-contrib:Launcher|here]].
1722 1 Christoph Kappel
1723 1 Christoph Kappel
1724 3 Christoph Kappel
h2.  How do I (auto)start programs?
1725 3 Christoph Kappel
1726 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
1727 2 Christoph Kappel
1728 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
1729 1 Christoph Kappel
1730 1 Christoph Kappel
<pre><code class="ruby">
1731 2 Christoph Kappel
subtle &
1732 2 Christoph Kappel
PID=$!
1733 2 Christoph Kappel
sleep 2
1734 2 Christoph Kappel
urxvt
1735 2 Christoph Kappel
wait $PID
1736 2 Christoph Kappel
</code></pre>
1737 2 Christoph Kappel
1738 2 Christoph Kappel
* Start your program via [[grabs]]:
1739 1 Christoph Kappel
1740 2 Christoph Kappel
<pre><code class="ruby">
1741 1 Christoph Kappel
"A-x" => "urxvt"
1742 1 Christoph Kappel
</code></pre>
1743 1 Christoph Kappel
1744 2 Christoph Kappel
There are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in [[subtle-contrib:Launcher|here]].
1745 2 Christoph Kappel
1746 2 Christoph Kappel
1747 3 Christoph Kappel
h2.  How to match a GLFW window
1748 3 Christoph Kappel
1749 2 Christoph Kappel
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
1750 2 Christoph Kappel
1751 1 Christoph Kappel
to match any GLFW window :
1752 2 Christoph Kappel
1753 1 Christoph Kappel
<pre>
1754 1 Christoph Kappel
tag "glfw" do
1755 1 Christoph Kappel
\tmatch name: "GLFW.*"
1756 1 Christoph Kappel
\t# Your code....
1757 1 Christoph Kappel
end
1758 2 Christoph Kappel
</pre>
1759 2 Christoph Kappel
1760 3 Christoph Kappel
h2.  How to match a GLFW window
1761 3 Christoph Kappel
1762 2 Christoph Kappel
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
1763 2 Christoph Kappel
1764 2 Christoph Kappel
to match any GLFW window :
1765 1 Christoph Kappel
1766 1 Christoph Kappel
<pre>
1767 1 Christoph Kappel
tag "glfw" do
1768 2 Christoph Kappel
\tmatch name: "GLFW.*"
1769 1 Christoph Kappel
\t# your code
1770 2 Christoph Kappel
end
1771 2 Christoph Kappel
</pre>
1772 2 Christoph Kappel
1773 3 Christoph Kappel
h2.  How to match a GLFW window
1774 3 Christoph Kappel
1775 2 Christoph Kappel
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
1776 2 Christoph Kappel
1777 1 Christoph Kappel
to match any GLFW window :
1778 1 Christoph Kappel
1779 2 Christoph Kappel
<pre>
1780 2 Christoph Kappel
tag "glfw" do
1781 1 Christoph Kappel
\tmatch name: "GLFW.*"
1782 2 Christoph Kappel
\t# your code
1783 1 Christoph Kappel
end
1784 2 Christoph Kappel
</pre>
1785 2 Christoph Kappel
1786 3 Christoph Kappel
h2.  Why does subtle cause to many wakeups?
1787 3 Christoph Kappel
1788 2 Christoph Kappel
The wakeups are caused by a "Ruby":http://ruby-lang.org internal polling thread that runs every 10ms to schedule/handle other threads and signals. There is currently no way to avoid that in "YARV":http://www.atdot.net/yarv/, although the problem is well known.
1789 2 Christoph Kappel
1790 1 Christoph Kappel
http://www.ruby-forum.com/topic/200147
1791 1 Christoph Kappel
1792 1 Christoph Kappel
There is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
1793 1 Christoph Kappel
1794 3 Christoph Kappel
h2.  Is there any log file?
1795 3 Christoph Kappel
1796 2 Christoph Kappel
Nope, there is *no* log file. In case you need one for e.g. reporting a bug +please+ read to the [[bugs|reporting a bug]] wiki page and check the paragraph about [[bugs#enable-logging|logging]].
1797 2 Christoph Kappel
1798 3 Christoph Kappel
h2.  How do I (auto)start programs?
1799 3 Christoph Kappel
1800 2 Christoph Kappel
There are several way how to start a certain programm, here are the most common:
1801 2 Christoph Kappel
1802 2 Christoph Kappel
* Start your program via your $HOME/.xinitrc:
1803 2 Christoph Kappel
1804 2 Christoph Kappel
<pre><code class="ruby">
1805 1 Christoph Kappel
subtle &
1806 1 Christoph Kappel
PID=$!
1807 2 Christoph Kappel
sleep 2
1808 1 Christoph Kappel
urxvt
1809 2 Christoph Kappel
wait $PID
1810 1 Christoph Kappel
</code></pre>
1811 2 Christoph Kappel
1812 1 Christoph Kappel
* Start your program via [[grabs]]:
1813 2 Christoph Kappel
1814 1 Christoph Kappel
<pre><code class="ruby">
1815 2 Christoph Kappel
"A-x" => "urxvt"
1816 2 Christoph Kappel
</code></pre>
1817 2 Christoph Kappel
1818 2 Christoph Kappel
There are many launchers available like "dmenu":http://tools.suckless.org/dmenu and there is even a launcher especially designed for [[subtle]], you can find it in [[subtle-contrib:Launcher|here]].
1819 1 Christoph Kappel
1820 1 Christoph Kappel
1821 3 Christoph Kappel
h2.  How do I tag gimp?
1822 3 Christoph Kappel
1823 1 Christoph Kappel
[[Tagging]] "GIMP":http://gimp.org can be nasty, because the current version (2.6) uses inconsistent window names and roles. The window roles are fixed in the current development snapshot and will hopefully find their way into the 2.8 release.
1824 2 Christoph Kappel
1825 1 Christoph Kappel
https://bugzilla.gnome.org/show_bug.cgi?id=645456
1826 2 Christoph Kappel
1827 3 Christoph Kappel
h2.  How do I set a wallpaper in subtle?
1828 3 Christoph Kappel
1829 2 Christoph Kappel
On start, [[subtle]] sets a background color (_if set_) to the root window and therefore *overwrites* any root pixmap set before. To avoid this, you just need to comment out the *&#58;background* line from your config.
1830 1 Christoph Kappel
1831 2 Christoph Kappel
[[subtle]] itself has no and will never have either an autostart or way to set a wallpaper directly. Normally you just want to setup your X session and and not [[subtle]]. Your _~/.xinitrc_ is the right place for stuff like this.
1832 2 Christoph Kappel
1833 2 Christoph Kappel
A background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
1834 1 Christoph Kappel
1835 3 Christoph Kappel
h2.  Why don't my grabs work with xyz keyboard layout?
1836 3 Christoph Kappel
1837 1 Christoph Kappel
Actually, I have no idea why setting the keyboard layout in your @xorg.conf@ isn't suffucient, but apparently you need to call *setxkbmap* in one of your startup files to set the keymap. My suggestion is to use the @~/.xinitrc@, because it is perfectly suited to setup Xorg and usually read.
1838 2 Christoph Kappel
1839 1 Christoph Kappel
Just add something like this to your @~/.xinitrc@ *before* you start [[subtle]]: 
1840 2 Christoph Kappel
1841 2 Christoph Kappel
<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
1842 2 Christoph Kappel
1843 3 Christoph Kappel
h2.  How to match a GLFW window
1844 3 Christoph Kappel
1845 2 Christoph Kappel
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
1846 1 Christoph Kappel
1847 2 Christoph Kappel
to match any GLFW window :
1848 2 Christoph Kappel
1849 2 Christoph Kappel
<pre>
1850 2 Christoph Kappel
tag "glfw" do
1851 2 Christoph Kappel
\tmatch name: "GLFW.*"
1852 2 Christoph Kappel
\t# Your code....
1853 2 Christoph Kappel
end
1854 2 Christoph Kappel
</pre>
1855 2 Christoph Kappel
1856 3 Christoph Kappel
h2.  How to match a GLFW window
1857 3 Christoph Kappel
1858 1 Christoph Kappel
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
1859 1 Christoph Kappel
1860 1 Christoph Kappel
to match any GLFW window :
1861 2 Christoph Kappel
1862 2 Christoph Kappel
<pre>
1863 2 Christoph Kappel
tag "glfw" do
1864 2 Christoph Kappel
\tmatch name: "GLFW.*"
1865 2 Christoph Kappel
\t# your code
1866 2 Christoph Kappel
end
1867 2 Christoph Kappel
</pre>
1868 2 Christoph Kappel
1869 3 Christoph Kappel
h2.  How can I manually delete a sublet?
1870 3 Christoph Kappel
1871 1 Christoph Kappel
[[Sublets]] usually consist of a *&#42;.rb* file, a *&#42;.spec* file and one or more icons. All these files can be found in their respective folder in @$XDG_DATA_HOME/subtle@ resp. @~/.local/share/subtle@. After deleting the [[sublets|sublet]] files the cache of [[sur]] needs to be updated or otherwise [[sur]] will think the [[sublets|sublet]] is still installed: @sur update -l@
1872 1 Christoph Kappel
1873 3 Christoph Kappel
h2.  Where does sur store sublets and icons?
1874 3 Christoph Kappel
1875 1 Christoph Kappel
[[sur]] follows the "XDG Base Directory specifications":http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html to store data, which includes some base path for specific data types.
1876 2 Christoph Kappel
1877 2 Christoph Kappel
Following paths are used:
1878 2 Christoph Kappel
1879 2 Christoph Kappel
|_. Type  |_. XDG path                    |_. Default path                |
1880 2 Christoph Kappel
| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
1881 2 Christoph Kappel
| Icons   | @$XDG_DATA_HOME/subtle(icons@   | @~/.local/share/subtle/icons@   |
1882 1 Christoph Kappel
1883 3 Christoph Kappel
h2.  How to match a GLFW window
1884 3 Christoph Kappel
1885 2 Christoph Kappel
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
1886 2 Christoph Kappel
1887 2 Christoph Kappel
to match any GLFW window :
1888 1 Christoph Kappel
1889 1 Christoph Kappel
<pre>
1890 2 Christoph Kappel
tag "glfw" do
1891 2 Christoph Kappel
\tmatch name: "GLFW.*"
1892 2 Christoph Kappel
\t# your code
1893 2 Christoph Kappel
end
1894 2 Christoph Kappel
</pre>
1895 2 Christoph Kappel
1896 3 Christoph Kappel
h2.  How do I run a program on startup/autostart?
1897 3 Christoph Kappel
1898 1 Christoph Kappel
Let's say you want "urxvt":http://software.schmorp.de/pkg/rxvt-unicode.html to start after [[subtle]], and for some reason @echo "urxvt" >> ~/.xinitrc@ is just not cutting it. Using the *&#58;start* hook and [[subtlext]] we can simulate autostart like so:
1899 2 Christoph Kappel
1900 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">
1901 2 Christoph Kappel
on :start do
1902 2 Christoph Kappel
  Subtlext::Subtle.spawn "urxvt"
1903 2 Christoph Kappel
end
1904 2 Christoph Kappel
</pre></code>
1905 1 Christoph Kappel
1906 3 Christoph Kappel
h2.  Where is the output window of flash in fullscreen?
1907 3 Christoph Kappel
1908 2 Christoph Kappel
For flash, browsers seem to use window instance and class names that doesn't match the browser values. Therefore the windows will usually appear on the default view.
1909 2 Christoph Kappel
1910 2 Christoph Kappel
Following names are currently in use:
1911 2 Christoph Kappel
1912 2 Christoph Kappel
|_. Browser       |_. Arch   |_. WM_NAME            |_. WM_CLASS                                 |
1913 1 Christoph Kappel
| Firefox <7.0.1  | all      | <unknown>            | "<unknown>", "<unknown>"                   |
1914 1 Christoph Kappel
| Firefox >=7.0.1 | all      | plugin-container     | "plugin-container", "Plugin-container"     |
1915 2 Christoph Kappel
| Chromium        | all      | exe                  | "exe", "Exe"                               |
1916 2 Christoph Kappel
| Opera           | x86      | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
1917 2 Christoph Kappel
| nspluginwrapper | x86_64   | "npviewer.bin"       | "Npviewer.bin"                             |
1918 2 Christoph Kappel
1919 2 Christoph Kappel
The easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
1920 2 Christoph Kappel
1921 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">tag "flash" do
1922 2 Christoph Kappel
  match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
1923 2 Christoph Kappel
  stick true
1924 2 Christoph Kappel
end</code></pre>
1925 2 Christoph Kappel
1926 3 Christoph Kappel
h2.  What is the difference between ViewSwitch and ViewJump?
1927 3 Christoph Kappel
1928 1 Christoph Kappel
Boths keys change the [[view]] of the current active [[screens|screen]], but the behavior how they do that depends on if the system consists either of a single [[screens|screen]] or more.
1929 2 Christoph Kappel
1930 3 Christoph Kappel
h2.  Single screen
1931 2 Christoph Kappel
1932 3 Christoph Kappel
1933 2 Christoph Kappel
Here both [[grabs]] do +exactly+ the same.
1934 2 Christoph Kappel
1935 3 Christoph Kappel
h2.  Multi screen
1936 2 Christoph Kappel
1937 3 Christoph Kappel
1938 2 Christoph Kappel
Here the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
1939 1 Christoph Kappel
1940 1 Christoph Kappel
* *ViewSwitch* either swaps the current [[views|view]] with the selected if it is visible on another [[screens|screen]] or just sets the selected [[views|view]] on current [[screens|screen]].
1941 2 Christoph Kappel
* *ViewJump* either focus the selected [[views|view]] if it is visible on another [[screens|screen]] or just sets the select [[views|view]] on current [[screens|screen]].
1942 1 Christoph Kappel
1943 3 Christoph Kappel
h2.  Why does program XYZ appears/turns as/to a gray canvas?
1944 3 Christoph Kappel
1945 2 Christoph Kappel
Generally, this happens, when a program needs a specific aspect ratio and [[subtle]] sets a gravity that violates this. Windows can tell the window manager about this kind of preferences via their size hints and [[subtle]] can honor those.
1946 1 Christoph Kappel
1947 2 Christoph Kappel
There are two possible ways:
1948 1 Christoph Kappel
1949 2 Christoph Kappel
# Enable size hints globally with the _&#58;resize_ option
1950 2 Christoph Kappel
  <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
1951 2 Christoph Kappel
# Enable this per program via [[tagging|tag]]
1952 1 Christoph Kappel
  <pre>{{hide}}<code class="ruby">tag "name" do
1953 2 Christoph Kappel
  match  "name"
1954 1 Christoph Kappel
  resize true
1955 2 Christoph Kappel
end</code></pre>
1956 2 Christoph Kappel
1957 2 Christoph Kappel
bq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
1958 2 Christoph Kappel
1959 3 Christoph Kappel
h2.  How do I run a Java program?
1960 3 Christoph Kappel
1961 2 Christoph Kappel
"Java":http://java.com *expects* a certain behaviour (_reparenting of client windows_) of a window manager which is not part of any standard, therefore some "Java":http://java.com programs just show a white canvas.
1962 2 Christoph Kappel
1963 1 Christoph Kappel
If this happens just try to start your program like this:
1964 1 Christoph Kappel
1965 1 Christoph Kappel
<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
1966 2 Christoph Kappel
1967 1 Christoph Kappel
This changes the default tookit of "Java":http://java.com to _MToolkit_, which is known to work with non-reparenting windows managers like [[subtle]]. Depending on your "OpenJDK":http://openjdk.java.net version and your architecture this may either lead to a segmentation fault or your "OpenJDK":http://openjdk.java.net just has no support for *MToolkit*. In this case check if your distribution has applied a patch for this issue which allows something like this to change the default behaviour:
1968 1 Christoph Kappel
1969 1 Christoph Kappel
<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
1970 2 Christoph Kappel
1971 2 Christoph Kappel
In case both doesn't work there is a third option: "Java":http://java.com seems to use an internally hardcoded list of window managers that are non-reparenting, the "suckless":http://suckless.org guys made a tool ("wmname":http://tools.suckless.org/wmname) to change the name of the wm.
1972 2 Christoph Kappel
1973 2 Christoph Kappel
Since r2520 [[subtle]] can do that for you, just enable the *&#58;wmname* option.
1974 2 Christoph Kappel
1975 2 Christoph Kappel
Generally this problem is really long lasting, see here: 
1976 2 Christoph Kappel
1977 1 Christoph Kappel
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
1978 2 Christoph Kappel
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
1979 1 Christoph Kappel
1980 2 Christoph Kappel
bq. Note: Many problems only affect the "JRE":http://www.oracle.com/technetwork/java/javase/downloads/index.html and can be avoided by using the "OpenJDK":http://openjdk.java.net.
1981 2 Christoph Kappel
1982 2 Christoph Kappel
1983 1 Christoph Kappel
1984 3 Christoph Kappel
h2.  How do I tag console based programs?
1985 3 Christoph Kappel
1986 2 Christoph Kappel
When console based programs like "irssi":http://irssi.org are started with a terminal like @urxvt -e irssi@, they usually just change the *WM_NAME* of the terminal and per default, [[subtle]] uses both of the *WM_CLASS* values for tagging.
1987 2 Christoph Kappel
1988 2 Christoph Kappel
The problem about that is, that the [[tagging]] is normally done before the terminal really starts the desired app. To avoid that all better known terminals support the *-name* argument which changes the instance value (first string) of the *WM_CLASS*: @urxvt -name irssi -e irssi@
1989 2 Christoph Kappel
1990 2 Christoph Kappel
Another problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
1991 2 Christoph Kappel
1992 2 Christoph Kappel
<pre><code class="ruby">tag "terms" do
1993 2 Christoph Kappel
  match "urxvt"
1994 2 Christoph Kappel
end</code></pre>
1995 1 Christoph Kappel
1996 2 Christoph Kappel
The common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value. So the easiest way to reliable match this client is a [[tagging|tag]] like this:
1997 1 Christoph Kappel
1998 2 Christoph Kappel
<pre><code class="ruby">tag "irssi" do
1999 2 Christoph Kappel
  match :instance => "irssi"
2000 2 Christoph Kappel
end</code></pre>
2001 2 Christoph Kappel
2002 2 Christoph Kappel
Following table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
2003 2 Christoph Kappel
2004 2 Christoph Kappel
|_. Command                  |_. WM_NAME    |_. WM_CLASS   |
2005 2 Christoph Kappel
| urxvt                      | urxvt        | urxvt, URxvt |
2006 2 Christoph Kappel
| urxvt -e irssi             | irssi        | urxvt, URxvt |
2007 2 Christoph Kappel
| urxvt -name irssi          | urxvt        | irssi, URxvt |
2008 2 Christoph Kappel
| urxvt -name irssi -e irssi | irssi        | irssi, URxvt |
2009 2 Christoph Kappel
2010 2 Christoph Kappel
Please have a look at the [[Tagging|tagging wiki page]] for more information.
2011 2 Christoph Kappel
2012 2 Christoph Kappel
2013 2 Christoph Kappel
2014 2 Christoph Kappel
2015 3 Christoph Kappel
h2.  How can I use subtle without numpad?
2016 3 Christoph Kappel
2017 2 Christoph Kappel
Per default [[subtle]] uses the numpad, because it's easier to remind the different postions when you can see them. Generally this is just a suggestion, it's up to you to change the grabs to your needs - any keys will work. 
2018 2 Christoph Kappel
2019 2 Christoph Kappel
Keys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
2020 2 Christoph Kappel
2021 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
2022 2 Christoph Kappel
grab "W-w", [ :top,          :top66,          :top33          ]
2023 2 Christoph Kappel
grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
2024 2 Christoph Kappel
grab "W-a", [ :left,         :left66,         :left33         ]
2025 1 Christoph Kappel
grab "W-s", [ :center,       :center66,       :center33       ]
2026 2 Christoph Kappel
grab "W-d", [ :right,        :right66,        :right33        ]
2027 1 Christoph Kappel
2028 2 Christoph Kappel
# QWERTZ
2029 2 Christoph Kappel
grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
2030 2 Christoph Kappel
2031 2 Christoph Kappel
# QWERTY
2032 2 Christoph Kappel
grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
2033 2 Christoph Kappel
2034 2 Christoph Kappel
grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
2035 2 Christoph Kappel
grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
2036 2 Christoph Kappel
</code></pre>
2037 2 Christoph Kappel
2038 2 Christoph Kappel
2039 2 Christoph Kappel
You can find more about assigning keys [[Grabs|here]].
2040 2 Christoph Kappel
2041 3 Christoph Kappel
h2.  How does subtle match clients?
2042 3 Christoph Kappel
2043 2 Christoph Kappel
[[subtle]] matches the {{color(#ff0000, WM_NAME)}} and the {{color(#0000ff, WM_CLASS)}} property of a window and not the title. This to ensure the match is correct. 
2044 2 Christoph Kappel
There are several ways to get these values, here are the most common:
2045 2 Christoph Kappel
2046 2 Christoph Kappel
Select the window with "xprop":http://www.xfree86.org/current/xprop.1.htmland have a look for the {{color(#ff0000, WM_NAME)}} and {{color(#0000ff, WM_CLASS)}} lines which usually look like this:
2047 2 Christoph Kappel
2048 2 Christoph Kappel
<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
2049 2 Christoph Kappel
{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
2050 1 Christoph Kappel
2051 2 Christoph Kappel
Run *[[subtler]] -cl* and look for the matching line:
2052 2 Christoph Kappel
2053 1 Christoph Kappel
<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
2054 2 Christoph Kappel
2055 3 Christoph Kappel
h2.  Is subtle a reparenting window manager?
2056 3 Christoph Kappel
2057 2 Christoph Kappel
*Nope*, [[subtle]] doesn't reparent windows and there is in fact *no* reason to do that. The layout in [[subtle]] is a really loose set, the only relation between a [[views|view]] and a [[client]] is [[tagging]] and this is checked on every [[views|view]] update.
2058 2 Christoph Kappel
2059 2 Christoph Kappel
Reparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
2060 2 Christoph Kappel
2061 2 Christoph Kappel
# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
2062 2 Christoph Kappel
# Reparent the [[client]] window to the toplevel window
2063 1 Christoph Kappel
# Handle (ignore here) the generated expose and crossing events
2064 2 Christoph Kappel
2065 1 Christoph Kappel
Probably sounds like not much overhead, but keep in mind this is just required because the developer of "Java":http://www.java.com/ and "Qt":http://qt.nokia.com/products/ cannot understand following line from the "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:
2066 2 Christoph Kappel
2067 2 Christoph Kappel
bq. Clients must be aware that some window managers will reparent their top-level windows so that a window that was created as a child of the root will be displayed as a child of some window belonging to the window manager
2068 2 Christoph Kappel
2069 3 Christoph Kappel
h2.  How do I move a program to another view?
2070 3 Christoph Kappel
2071 2 Christoph Kappel
Placement in [[subtle]] is +strict+ and completely done via [[tagging]]. There are many ways to change [[tagging|tags]] per runtime, common is to use either [[subtler]] or [[subtlext]].
2072 2 Christoph Kappel
2073 3 Christoph Kappel
h2.  subtler
2074 2 Christoph Kappel
2075 3 Christoph Kappel
2076 1 Christoph Kappel
[[subtler]] can be used on the commandline:
2077 2 Christoph Kappel
2078 1 Christoph Kappel
<pre>{{hide}}<code class="ruby">
2079 2 Christoph Kappel
subtler -ta tag         #< Add new tag 'tag'
2080 2 Christoph Kappel
subtler -cT client tag  #< Tag client 'client' with tag 'tag'
2081 2 Christoph Kappel
subtler -vT view tag    #< Tag view 'view' with tag 'tag'
2082 2 Christoph Kappel
</code></pre>
2083 2 Christoph Kappel
2084 3 Christoph Kappel
h2.  subtlext
2085 2 Christoph Kappel
2086 3 Christoph Kappel
2087 2 Christoph Kappel
[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
2088 2 Christoph Kappel
2089 2 Christoph Kappel
<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
2090 2 Christoph Kappel
2091 2 Christoph Kappel
tag = Subtlext::Tag.new("tag").save  #< Add new tag 'tag'
2092 2 Christoph Kappel
Subtlext::Client["client"] + "tag"   #< Tag client 'client' with tag 'tag'
2093 2 Christoph Kappel
Subtlext::View["view"] + "tag"       #< Tag view 'view' with tag 'tag'
2094 2 Christoph Kappel
</code></pre>
2095 2 Christoph Kappel
2096 3 Christoph Kappel
h2.  Snippets
2097 2 Christoph Kappel
2098 3 Christoph Kappel
2099 2 Christoph Kappel
The [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
2100 2 Christoph Kappel
2101 3 Christoph Kappel
h2.  Contrib
2102 2 Christoph Kappel
2103 3 Christoph Kappel
2104 2 Christoph Kappel
h3. Vitag
2105 2 Christoph Kappel
2106 2 Christoph Kappel
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki contains [[subtle-contrib:vitag|vitag]] a script to change the [[tagging|tags]] of windows and views with an editor.
2107 2 Christoph Kappel
2108 2 Christoph Kappel
h3. Launcher
2109 2 Christoph Kappel
2110 2 Christoph Kappel
The "launcher":http://subforge.org/projects/subtle-contrib/wiki#Launcher uses quite the opposite way, instead of moving a window to a certain screen it just provides a way to launch a window directly on the right view with the correct [[tagging|tags]].
2111 2 Christoph Kappel
2112 3 Christoph Kappel
h2.  Stick
2113 2 Christoph Kappel
2114 3 Christoph Kappel
2115 2 Christoph Kappel
Most of the time, setting the window to *stick* does the trick too. Stick just displays the window on all views until the mode is disabled again. This can be done with [[grabs]] (default keys: *W-s*) or with [[subtler]]. (click on the window: @subtler -cXS@)
2116 2 Christoph Kappel
2117 2 Christoph Kappel
2118 2 Christoph Kappel
2119 3 Christoph Kappel
h2.  What is required for the volume sublet?
2120 3 Christoph Kappel
2121 2 Christoph Kappel
The volume [[sublets|sublet]] uses @/dev/mixer@ to set/get the volume levels, which is an older interface introduced with "OSS":http://www.opensound.com/ and still available via "ALSA OSS emulation":http://www.alsa-project.org/. Apparently, newer kernels refuse to autoload that module anymore and you need to load it manually or via any init file.
2122 2 Christoph Kappel
2123 2 Christoph Kappel
{{info(Please check to the docs of your distribution how to do it.)}}
2124 2 Christoph Kappel
2125 2 Christoph Kappel
<pre><code>modprobe snd_mixer_oss</code></pre>
2126 2 Christoph Kappel
2127 2 Christoph Kappel
{{warn(Following explanation is technical!)}}
2128 2 Christoph Kappel
2129 2 Christoph Kappel
The [[sublets|sublet]] needs a way to access a mixer without any asynchronous callbacks. The reason for that is that [[subtle]] is single-threaded and can't use a dedicated thread to wait for the reply, but the APIs of "ALSA":http://www.alsa-project.org/ and "PulseAudio":http://pulseaudio.org are both designed to be asynchronous. Normally event drivven is fine but it is troublesome when you can't use their mainloop.
2130 2 Christoph Kappel
2131 2 Christoph Kappel
Since there is no way to add e.g. a control socket to the event main loop of [[subtle]], the @/dev/mixer@ approach is the only way and works for all sound systems.