FAQ » History » Version 2
Version 1 (Christoph Kappel, 01/23/2018 02:11 PM) → Version 2/10 (Christoph Kappel, 01/23/2018 02:19 PM)
h1. FAQ
{{toc}}
n h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:\r\n\r\n* Start your program via your $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grab]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"\r\n</code></pre>\r\n\r\n_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT view tag #< Tag view 'view' with tag 'tag'\r\nsubtler -vT client tag #< Tag client 'client' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
* common:\r\n\r\n* "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:
p{class:pre}. this:\r\n\r\np{class:pre}. WM_CLASS(STRING) = "{{color(#ff0000, urxvt)}}", "{{color(#0000ff, URxvt)}}")
* URxvt)}}")\r\n\r\n* [[subtler]]: Run *[[subtler]] -cl* and look for the matching line:
p{class:pre}. line:\r\n\r\np{class:pre}. 0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
[[Grabs]]:
<pre><code class="ruby">
def 'tag'\r\n</code></pre>\r\n\r\n[[Grabs]]:\r\n<pre><code class="ruby">\r\ndef move_view(client, view_id)
begin
view_id)\r\n begin\r\n cur = current_view
current_view\r\n view = views[view_id - 1]
begin
1]\r\n\r\n begin\r\n tag = find_tag(view.name)
rescue
find_tag(view.name)\r\n rescue\r\n tag = add_tag(view.name)
end
add_tag(view.name)\r\n end\r\n\r\n # Remove client from current tag
if(client.has_tag?(cur.name))
client.untag(cur.name)
end
tag\r\n if(client.has_tag?(cur.name))\r\n client.untag(cur.name)\r\n end\r\n \r\n # Tag new view with itself
if(!view.has_tag?(tag))
view.tag(tag)
end
itself\r\n if(!view.has_tag?(tag))\r\n view.tag(tag)\r\n end\r\n\r\n # Finally add tag to client
client.tag(tag)
client\r\n client.tag(tag)\r\n rescue => err
err\r\n puts err
end
end
GRABS err\r\n end\r\nend\r\n\r\nGRABS = {
{\r\n "A-F1" => lambda { |c| move_view(c, 1) },
},\r\n "A-F2" => lambda { |c| move_view(c, 2) },
},\r\n "A-F3" => lambda { |c| move_view(c, 3) },
},\r\n "A-F4" => lambda { |c| move_view(c, 4) }
}
</code></pre>
In }\r\n}\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Or 'tag'\r\n</code></pre>\r\n\r\nOr with [[grabs]] and "Ruby":http://www.ruby-lang.org lambdas:
[[Grabs]]:
<pre><code class="ruby">
def lambdas:\r\n\r\n[[Grabs]]:\r\n<pre><code class="ruby">\r\ndef move_view(client, view_id)
begin
view_id)\r\n begin\r\n cur = current_view
current_view\r\n view = views[view_id - 1]
begin
1]\r\n\r\n begin\r\n tag = find_tag(view.name)
rescue
find_tag(view.name)\r\n rescue\r\n tag = add_tag(view.name)
end
add_tag(view.name)\r\n end\r\n\r\n # Remove client from current tag
if(client.has_tag?(cur.name))
client.untag(cur.name)
end
tag\r\n if(client.has_tag?(cur.name))\r\n client.untag(cur.name)\r\n end\r\n \r\n # Tag new view with itself
if(!view.has_tag?(tag))
view.tag(tag)
end
itself\r\n if(!view.has_tag?(tag))\r\n view.tag(tag)\r\n end\r\n\r\n # Finally add tag to client
client.tag(tag)
client\r\n client.tag(tag)\r\n rescue => err
err\r\n puts err
end
end
GRABS err\r\n end\r\nend\r\n\r\nGRABS = {
{\r\n "A-F1" => lambda { |c| move_view(c, 1) },
},\r\n "A-F2" => lambda { |c| move_view(c, 2) },
},\r\n "A-F3" => lambda { |c| move_view(c, 3) },
},\r\n "A-F4" => lambda { |c| move_view(c, 4) }
}
</code></pre>
In }\r\n}\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I set a wallpaper in subtle?
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this.
Due \r\n\r\nDue the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before.
This \r\n\r\nThis can be bypassed with this:
<pre><code this:\r\n\r\n<pre><code class="ruby">subtle &
PID=$!
display &\r\nPID=$!\r\ndisplay -window root pixmap.png
wait $PID
</code></pre> pixmap.png\r\nwait $PID\r\n</code></pre>
h2. How do I set a wallpaper in subtle?
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this.
Due \r\n\r\nDue the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before.
This \r\n\r\nThis can be bypassed with this:
<pre><code this:\r\n\r\n<pre><code class="ruby">subtle &
PID=$!
display &\r\nPID=$!\r\ndisplay -window root pixmap.png
wait $PID
</code></pre>
Or pixmap.png\r\nwait $PID\r\n</code></pre>\r\n\r\nOr just comment out the background line.
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
Generally program</code></pre>\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grab]]:
<pre><code class="ruby">
"A-x" [[grab]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
_"dmenu":http://tools.suckless.org/dmenu "urxvt"\r\n</code></pre>\r\n\r\n_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
Generally program</code></pre>\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
Subtlext::Tag.new("tag").save 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\nSubtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
Subtlext::Tag.new("tag").save 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\nSubtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I add tags to console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre><code *y-x-c*:\r\n\r\n<pre><code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
grab ]\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
h2. How do I run a program on startup?
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:
<pre>
on so:\r\n\r\n<pre>\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre> "urxvt"\r\nend\r\n</pre>
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre><code *y-x-c*:\r\n\r\n<pre><code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease 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:
<pre><code windows:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n exclude :instance => "irssi"
end</code></pre> "irssi"\r\nend</code></pre>
h2. Why does program XYZ appears/turns as/to a gray canvas?
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:
# those:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. How can I delete a sublet manually?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. How can I manually delete a sublet?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | exe | "exe", "Exe" |
| |\r\n| Opera | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unkown>|exe|operapluginwrapper"
"<unkown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. How do I run a program on startup/autostart?
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 *:start* hook and [[subtlext]] we can simulate autostart like so:
<pre>{{hide}}<code class="ruby">
on so:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre></code> "urxvt"\r\nend\r\n</pre></code>
h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
Additionally "urxvt"\r\n</code></pre>\r\n\r\nAdditionally 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.
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.\r\n
h2. How do I start program XYZ?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
Additionally "urxvt"\r\n</code></pre>\r\n\r\nAdditionally 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.
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I set a wallpaper in subtle?
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 *:background* line from your config.
[[subtle]] config.\r\n\r\n[[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.
A this.\r\n\r\nA background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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)
-cXS)\r\n\r\n
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end
.bq true\r\nend\r\n\r\n.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.
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. Is there any log file?
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]].
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 wm.\r\n\r\nSince r2520 [[subtle]] can do that for you, just enable the *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | exe | "exe", "Exe" |
| |\r\n| Opera | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper"
"<unknown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | x86 | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | x86 | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper"
"<unknown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | x86 | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | x86 | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper|npviewer.bin"
"<unknown>|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. What is required for the volume sublet?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. Where does sur store sublets and icons?
[[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.
Following types.\r\n\r\nFollowing paths are used:
|_. used:\r\n\r\n|_. Type |_. XDG path |_. Default path |
| |\r\n| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
| |\r\n| Icons | @$XDG_DATA_HOME/subtle(icons@ | @~/.local/share/subtle/icons@ |
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name" do
do\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends of the select [[views|view]] is visible on another screen or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *ViewJump* either focus the selected [[views|view]] if it is visible on another screen or just sets the select view on current [[screens|screen]].
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *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]].
h2. Why does subtle cause to many wakeups?
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. known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147
http://www.ruby-forum.com/topic/200147
h2. How do I tag gimp?
[[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. release.\r\n\r\nhttps://bugzilla.gnome.org/show_bug.cgi?id=645456
https://bugzilla.gnome.org/show_bug.cgi?id=645456
h2. How do I move a program to another view?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I start a program?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the {{color(#ff0000, WM_CLASS)}} and may match other [[tagging|tags]].
The [[tagging|tags]].\r\n\r\nThe common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value.
Following \r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
So |\r\n\r\nSo the easiest way to reliable match this client is a [[lagging|tag]] like this:
<pre>code this:\r\n\r\n<pre>code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
"irssi"\r\nend</code></pre>\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value.
Following \r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
So |\r\n\r\nSo the easiest way to reliable match this client is a [[lagging|tag]] like this:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
"irssi"\r\nend</code></pre>\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
|\r\n\r\n\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
|\r\n\r\n\r\n\r\n
h2. Why did the volume sublet stop working after kernel update?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
{{warn(Following it.)}}\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. Why did the volume sublet stop working after kernel update?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. Is subtle a reparenting window manager?
*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.
Reparenting update.\r\n\r\nReparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
# [[views|view]]:\r\n\r\n# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
# [[screen]]\r\n# Reparent the [[client]] window to the toplevel window
# window\r\n# Handle (ignore here) the generated expose and crossing events
Probably events\r\n\r\nProbably 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:
bq. "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:\r\n\r\nbq. 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
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
Please |\r\n\r\nPlease have a look at the [[Tagging|tagging wiki page]] for more information.
information.\r\n\r\n\r\n
h2. Why does subtle cause to many wakeups?
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.
http://www.ruby-forum.com/topic/200147
There known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147\r\n\r\nThere is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
h2. Why don't my grabs work with xyz keyboard layout?
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.
Just read.\r\n\r\nJust add something like this to your @~/.xinitrc@ *before* you start [[subtle]]:
<pre><code>setxkbmap \r\n\r\n<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox <7.0.1 | all | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Firefox >=7.0.1 | all | plugin-container | "plugin-container", "Plugin-container" |
| |\r\n| Chromium | all | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
"<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. How do I (auto)start applications?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I (auto)start programs?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How to match a GLFW window
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# Your code....
end
</pre> code....\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. Why does subtle cause to many wakeups?
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.
http://www.ruby-forum.com/topic/200147
There known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147\r\n\r\nThere is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
h2. Is there any log file?
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]].
h2. How do I (auto)start programs?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I tag gimp?
[[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. release.\r\n\r\nhttps://bugzilla.gnome.org/show_bug.cgi?id=645456
https://bugzilla.gnome.org/show_bug.cgi?id=645456
h2. How do I set a wallpaper in subtle?
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 *:background* line from your config.
[[subtle]] config.\r\n\r\n[[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.
A this.\r\n\r\nA background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
h2. Why don't my grabs work with xyz keyboard layout?
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.
Just read.\r\n\r\nJust add something like this to your @~/.xinitrc@ *before* you start [[subtle]]:
<pre><code>setxkbmap \r\n\r\n<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
h2. How to match a GLFW window
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# Your code....
end
</pre> code....\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How can I manually delete a sublet?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. Where does sur store sublets and icons?
[[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.
Following types.\r\n\r\nFollowing paths are used:
|_. used:\r\n\r\n|_. Type |_. XDG path |_. Default path |
| |\r\n| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
| |\r\n| Icons | @$XDG_DATA_HOME/subtle(icons@ | @~/.local/share/subtle/icons@ |
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How do I run a program on startup/autostart?
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 *:start* hook and [[subtlext]] we can simulate autostart like so:
<pre>{{hide}}<code class="ruby">
on so:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre></code> "urxvt"\r\nend\r\n</pre></code>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox <7.0.1 | all | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Firefox >=7.0.1 | all | plugin-container | "plugin-container", "Plugin-container" |
| |\r\n| Chromium | all | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
"<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *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]].
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name" do
do\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 wm.\r\n\r\nSince r2520 [[subtle]] can do that for you, just enable the *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
Please |\r\n\r\nPlease have a look at the [[Tagging|tagging wiki page]] for more information.
information.\r\n\r\n\r\n
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. Is subtle a reparenting window manager?
*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.
Reparenting update.\r\n\r\nReparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
# [[views|view]]:\r\n\r\n# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
# [[screen]]\r\n# Reparent the [[client]] window to the toplevel window
# window\r\n# Handle (ignore here) the generated expose and crossing events
Probably events\r\n\r\nProbably 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:
bq. "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:\r\n\r\nbq. 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
h2. How do I move a program to another view?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. What is required for the volume sublet?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
{{toc}}
n h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:\r\n\r\n* Start your program via your $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grab]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"\r\n</code></pre>\r\n\r\n_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT view tag #< Tag view 'view' with tag 'tag'\r\nsubtler -vT client tag #< Tag client 'client' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
* common:\r\n\r\n* "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:
p{class:pre}. this:\r\n\r\np{class:pre}. WM_CLASS(STRING) = "{{color(#ff0000, urxvt)}}", "{{color(#0000ff, URxvt)}}")
* URxvt)}}")\r\n\r\n* [[subtler]]: Run *[[subtler]] -cl* and look for the matching line:
p{class:pre}. line:\r\n\r\np{class:pre}. 0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
[[Grabs]]:
<pre><code class="ruby">
def 'tag'\r\n</code></pre>\r\n\r\n[[Grabs]]:\r\n<pre><code class="ruby">\r\ndef move_view(client, view_id)
begin
view_id)\r\n begin\r\n cur = current_view
current_view\r\n view = views[view_id - 1]
begin
1]\r\n\r\n begin\r\n tag = find_tag(view.name)
rescue
find_tag(view.name)\r\n rescue\r\n tag = add_tag(view.name)
end
add_tag(view.name)\r\n end\r\n\r\n # Remove client from current tag
if(client.has_tag?(cur.name))
client.untag(cur.name)
end
tag\r\n if(client.has_tag?(cur.name))\r\n client.untag(cur.name)\r\n end\r\n \r\n # Tag new view with itself
if(!view.has_tag?(tag))
view.tag(tag)
end
itself\r\n if(!view.has_tag?(tag))\r\n view.tag(tag)\r\n end\r\n\r\n # Finally add tag to client
client.tag(tag)
client\r\n client.tag(tag)\r\n rescue => err
err\r\n puts err
end
end
GRABS err\r\n end\r\nend\r\n\r\nGRABS = {
{\r\n "A-F1" => lambda { |c| move_view(c, 1) },
},\r\n "A-F2" => lambda { |c| move_view(c, 2) },
},\r\n "A-F3" => lambda { |c| move_view(c, 3) },
},\r\n "A-F4" => lambda { |c| move_view(c, 4) }
}
</code></pre>
In }\r\n}\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Or 'tag'\r\n</code></pre>\r\n\r\nOr with [[grabs]] and "Ruby":http://www.ruby-lang.org lambdas:
[[Grabs]]:
<pre><code class="ruby">
def lambdas:\r\n\r\n[[Grabs]]:\r\n<pre><code class="ruby">\r\ndef move_view(client, view_id)
begin
view_id)\r\n begin\r\n cur = current_view
current_view\r\n view = views[view_id - 1]
begin
1]\r\n\r\n begin\r\n tag = find_tag(view.name)
rescue
find_tag(view.name)\r\n rescue\r\n tag = add_tag(view.name)
end
add_tag(view.name)\r\n end\r\n\r\n # Remove client from current tag
if(client.has_tag?(cur.name))
client.untag(cur.name)
end
tag\r\n if(client.has_tag?(cur.name))\r\n client.untag(cur.name)\r\n end\r\n \r\n # Tag new view with itself
if(!view.has_tag?(tag))
view.tag(tag)
end
itself\r\n if(!view.has_tag?(tag))\r\n view.tag(tag)\r\n end\r\n\r\n # Finally add tag to client
client.tag(tag)
client\r\n client.tag(tag)\r\n rescue => err
err\r\n puts err
end
end
GRABS err\r\n end\r\nend\r\n\r\nGRABS = {
{\r\n "A-F1" => lambda { |c| move_view(c, 1) },
},\r\n "A-F2" => lambda { |c| move_view(c, 2) },
},\r\n "A-F3" => lambda { |c| move_view(c, 3) },
},\r\n "A-F4" => lambda { |c| move_view(c, 4) }
}
</code></pre>
In }\r\n}\r\n</code></pre>\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I set a wallpaper in subtle?
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this.
Due \r\n\r\nDue the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before.
This \r\n\r\nThis can be bypassed with this:
<pre><code this:\r\n\r\n<pre><code class="ruby">subtle &
PID=$!
display &\r\nPID=$!\r\ndisplay -window root pixmap.png
wait $PID
</code></pre> pixmap.png\r\nwait $PID\r\n</code></pre>
h2. How do I set a wallpaper in subtle?
[[subtle]] itself has no own functionality to set a wallpaper, _~/.xinitrc_ is perfectly suited for this.
Due \r\n\r\nDue the design of [[subtle]] sets background color of the root window and therefore overwrites any root pixmap set before.
This \r\n\r\nThis can be bypassed with this:
<pre><code this:\r\n\r\n<pre><code class="ruby">subtle &
PID=$!
display &\r\nPID=$!\r\ndisplay -window root pixmap.png
wait $PID
</code></pre>
Or pixmap.png\r\nwait $PID\r\n</code></pre>\r\n\r\nOr just comment out the background line.
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
Generally program</code></pre>\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
s 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\ns = Subtlext::Subtle.new #< Connect to subtle
s.find_client("client").tag("tag") subtle\r\ns.find_client("client").tag("tag") #< Tag client 'client' with tag 'tag'
s.find_view("view").tag("tag") 'tag'\r\ns.find_view("view").tag("tag") #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grab]]:
<pre><code class="ruby">
"A-x" [[grab]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
_"dmenu":http://tools.suckless.org/dmenu "urxvt"\r\n</code></pre>\r\n\r\n_"dmenu":http://tools.suckless.org/dmenu is added as default launcher in the distributed config to make it more convenient._
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
Generally program</code></pre>\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
Subtlext::Tag.new("tag").save 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\nSubtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I move program xyz to view abc?
Placement in [[subtle]] is +strict+ and completely done via the [[Tags|tagging system]] and is initially usually done in the [[config]].
You [[config]].\r\n\r\nYou can change tags either with [[subtler]] or [[subtlext]] per runtime:
[[Subtler]]:
<pre><code class="ruby">
subtler runtime:\r\n\r\n[[Subtler]]:\r\n<pre><code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
[[Subtlext]]:
<pre><code class="ruby">
Subtlext::Tag.new("tag").save 'tag'\r\n</code></pre>\r\n\r\n[[Subtlext]]:\r\n<pre><code class="ruby">\r\nSubtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
Please 'tag'\r\n</code></pre>\r\n\r\nPlease also have a look at the [[recipes]] wiki page which also includes two examples how to move clients.
In clients.\r\n\r\nIn _/usr/share/subtle/scripts_ is a tagging example script with the help of "dmenu":http://tools.suckless.org/dmenu.
h2. How do I add tags to console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match others [[Tagging|tags]] too.
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre><code *y-x-c*:\r\n\r\n<pre><code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
grab ]\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease keep in mind, that the {{color(#ff0000, WM_CLASS)}} {{color(#ff00ff, class)}} name is still *URxvt* and will match other [[Tagging|tags]] too.
h2. How do I run a program on startup?
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:
<pre>
on so:\r\n\r\n<pre>\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre> "urxvt"\r\nend\r\n</pre>
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre><code *y-x-c*:\r\n\r\n<pre><code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I tag console based programs?
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:
<pre><code terminal:\r\n\r\n<pre><code class="bash">urxvt -e irssi</code></pre>
Inspecting irssi</code></pre>\r\n\r\nInspecting the terminal with "xprop":http://www.xfree86.org/current/xprop.1.html:
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "urxvt")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
So "URxvt")}}</code></pre>\r\n\r\nSo if we want to tag this window there are some things that should be considered:
* considered:\r\n\r\n* "irssi":http://irssi.org updates the {{color(#0000ff, WM_NAME)}} only
* only\r\n* [[Tagging]] matches per default both {{color(#ff0000, WM_CLASS)}} components ({{color(#aa0000, instance)}} and {{color(#ff00ff, class)}} name)
* name)\r\n* [[Tagging|Tags]] are applied when a window is mapped - that is *before* the terminal launches "irssi":http://irssi.org
To "irssi":http://irssi.org\r\n\r\nTo safely [[Tagging|tag]] it's better to change the {{color(#aa0000, instance)}} name of the terminal like this:
<pre><code this:\r\n\r\n<pre><code class="bash">urxvt -name irssi -e irssi</code></pre>
This irssi</code></pre>\r\n\r\nThis results in following (via "xprop":http://www.xfree86.org/current/xprop.1.html):
<pre><code "xprop":http://www.xfree86.org/current/xprop.1.html):\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "irssi"
{{color(#ff0000, "irssi"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
A "URxvt")}}</code></pre>\r\n\r\nA [[Tagging|tag]] for this could be:
<pre><code be:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Please "irssi"\r\nend</code></pre>\r\n\r\nPlease 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:
<pre><code windows:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n exclude :instance => "irssi"
end</code></pre> "irssi"\r\nend</code></pre>
h2. Why does program XYZ appears/turns as/to a gray canvas?
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:
# those:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. How can I delete a sublet manually?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. How can I manually delete a sublet?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | exe | "exe", "Exe" |
| |\r\n| Opera | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unkown>|exe|operapluginwrapper"
"<unkown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. How do I run a program on startup/autostart?
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 *:start* hook and [[subtlext]] we can simulate autostart like so:
<pre>{{hide}}<code class="ruby">
on so:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre></code> "urxvt"\r\nend\r\n</pre></code>
h2. How do I start program xyz?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
Additionally "urxvt"\r\n</code></pre>\r\n\r\nAdditionally 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.
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.\r\n
h2. How do I start program XYZ?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
Additionally "urxvt"\r\n</code></pre>\r\n\r\nAdditionally 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.
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki#Launcher.\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end true\r\nend
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
\r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\n
h2. How do I set a wallpaper in subtle?
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 *:background* line from your config.
[[subtle]] config.\r\n\r\n[[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.
A this.\r\n\r\nA background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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)
-cXS)\r\n\r\n
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to "move":http://subforge.org/wiki/subtle/Snippets#Move-windows windows to another view.
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view.\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I run a java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end
.bq true\r\nend\r\n\r\n.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.
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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.
Generally \r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name"
"name"\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. Is there any log file?
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]].
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 wm.\r\n\r\nSince r2520 [[subtle]] can do that for you, just enable the *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | exe | "exe", "Exe" |
| |\r\n| Opera | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper"
"<unknown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | x86 | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | x86 | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper"
"<unknown>|exe|operapluginwrapper"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox | x86 | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Chromium | x86 | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|exe|operapluginwrapper|npviewer.bin"
"<unknown>|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. What is required for the volume sublet?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. How do I move program xyz to view abc?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. Where does sur store sublets and icons?
[[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.
Following types.\r\n\r\nFollowing paths are used:
|_. used:\r\n\r\n|_. Type |_. XDG path |_. Default path |
| |\r\n| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
| |\r\n| Icons | @$XDG_DATA_HOME/subtle(icons@ | @~/.local/share/subtle/icons@ |
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name" do
do\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends of the select [[views|view]] is visible on another screen or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *ViewJump* either focus the selected [[views|view]] if it is visible on another screen or just sets the select view on current [[screens|screen]].
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *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]].
h2. Why does subtle cause to many wakeups?
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. known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147
http://www.ruby-forum.com/topic/200147
h2. How do I tag gimp?
[[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. release.\r\n\r\nhttps://bugzilla.gnome.org/show_bug.cgi?id=645456
https://bugzilla.gnome.org/show_bug.cgi?id=645456
h2. How do I move a program to another view?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. How do I start a program?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the {{color(#ff0000, WM_CLASS)}} and may match other [[tagging|tags]].
The [[tagging|tags]].\r\n\r\nThe common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value.
Following \r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
So |\r\n\r\nSo the easiest way to reliable match this client is a [[lagging|tag]] like this:
<pre>code this:\r\n\r\n<pre>code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
"irssi"\r\nend</code></pre>\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe common solution to bypass is this to use the :instance matcher, which just matches when for the specific instance value.
Following \r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
So |\r\n\r\nSo the easiest way to reliable match this client is a [[lagging|tag]] like this:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
"irssi"\r\nend</code></pre>\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
|\r\n\r\n\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
|\r\n\r\n\r\n\r\n
h2. Why did the volume sublet stop working after kernel update?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
{{warn(Following it.)}}\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. Why did the volume sublet stop working after kernel update?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.
h2. Is subtle a reparenting window manager?
*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.
Reparenting update.\r\n\r\nReparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
# [[views|view]]:\r\n\r\n# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
# [[screen]]\r\n# Reparent the [[client]] window to the toplevel window
# window\r\n# Handle (ignore here) the generated expose and crossing events
Probably events\r\n\r\nProbably 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:
bq. "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:\r\n\r\nbq. 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
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
Please |\r\n\r\nPlease have a look at the [[Tagging|tagging wiki page]] for more information.
information.\r\n\r\n\r\n
h2. Why does subtle cause to many wakeups?
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.
http://www.ruby-forum.com/topic/200147
There known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147\r\n\r\nThere is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
h2. Why don't my grabs work with xyz keyboard layout?
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.
Just read.\r\n\r\nJust add something like this to your @~/.xinitrc@ *before* you start [[subtle]]:
<pre><code>setxkbmap \r\n\r\n<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox <7.0.1 | all | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Firefox >=7.0.1 | all | plugin-container | "plugin-container", "Plugin-container" |
| |\r\n| Chromium | all | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
"<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. How do I (auto)start applications?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I (auto)start programs?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How to match a GLFW window
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# Your code....
end
</pre> code....\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. Why does subtle cause to many wakeups?
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.
http://www.ruby-forum.com/topic/200147
There known.\r\n\r\nhttp://www.ruby-forum.com/topic/200147\r\n\r\nThere is finally some progress regarding this: http://www.ruby-forum.com/topic/549998
h2. Is there any log file?
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]].
h2. How do I (auto)start programs?
There are several way how to start a certain programm, here are the most common:
* common:\r\n\r\n* Start your program via your $HOME/.xinitrc:
<pre><code class="ruby">
subtle &
PID=$!
sleep 2
urxvt
wait $PID
</code></pre>
* $HOME/.xinitrc:\r\n\r\n<pre><code class="ruby">\r\nsubtle &\r\nPID=$!\r\nsleep 2\r\nurxvt\r\nwait $PID\r\n</code></pre>\r\n\r\n* Start your program via [[grabs]]:
<pre><code class="ruby">
"A-x" [[grabs]]:\r\n\r\n<pre><code class="ruby">\r\n"A-x" => "urxvt"
</code></pre>
There "urxvt"\r\n</code></pre>\r\n\r\nThere 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]].
[[subtle-contrib:Launcher|here]].\r\n
h2. How do I tag gimp?
[[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. release.\r\n\r\nhttps://bugzilla.gnome.org/show_bug.cgi?id=645456
https://bugzilla.gnome.org/show_bug.cgi?id=645456
h2. How do I set a wallpaper in subtle?
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 *:background* line from your config.
[[subtle]] config.\r\n\r\n[[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.
A this.\r\n\r\nA background can easily set with a tool like "feh":http://linuxbrit.co.uk/software/feh/.
h2. Why don't my grabs work with xyz keyboard layout?
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.
Just read.\r\n\r\nJust add something like this to your @~/.xinitrc@ *before* you start [[subtle]]:
<pre><code>setxkbmap \r\n\r\n<pre><code>setxkbmap -layout 'de(nodeadkeys)'</code></pre>
h2. How to match a GLFW window
GLFW set the windows name after the window get created, so you can't match a particular GLFW window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# Your code....
end
</pre> code....\r\nend\r\n</pre>
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How can I manually delete a sublet?
[[Sublets]] usually consist of a **.rb* file, a **.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@
h2. Where does sur store sublets and icons?
[[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.
Following types.\r\n\r\nFollowing paths are used:
|_. used:\r\n\r\n|_. Type |_. XDG path |_. Default path |
| |\r\n| Sublets | @$XDG_DATA_HOME/subtle/sublets@ | @~/.local/share/subtle/sublets@ |
| |\r\n| Icons | @$XDG_DATA_HOME/subtle(icons@ | @~/.local/share/subtle/icons@ |
h2. How to match a GLFW window
GLFW set the name of the window after the window get created, so you can't match a particular window by his name.
to name.\r\n\r\nto match any GLFW window :
<pre>
tag :\r\n\r\n<pre>\r\ntag "glfw" do
\tmatch do\r\n\tmatch name: "GLFW.*"
\t# "GLFW.*"\r\n\t# your code
end
</pre> code\r\nend\r\n</pre>
h2. How do I run a program on startup/autostart?
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 *:start* hook and [[subtlext]] we can simulate autostart like so:
<pre>{{hide}}<code class="ruby">
on so:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\non :start do
do\r\n Subtlext::Subtle.spawn "urxvt"
end
</pre></code> "urxvt"\r\nend\r\n</pre></code>
h2. Where is the output window of flash in fullscreen?
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.
Following view.\r\n\r\nFollowing names are currently in use:
|_. use:\r\n\r\n|_. Browser |_. Arch |_. WM_NAME |_. WM_CLASS |
| |\r\n| Firefox <7.0.1 | all | <unknown> | "<unknown>", "<unknown>" |
| |\r\n| Firefox >=7.0.1 | all | plugin-container | "plugin-container", "Plugin-container" |
| |\r\n| Chromium | all | exe | "exe", "Exe" |
| |\r\n| Opera | x86 | "operapluginwrapper" | "operapluginwrapper", "Operapluginwrapper" |
| |\r\n| nspluginwrapper | x86_64 | "npviewer.bin" | "Npviewer.bin" |
The |\r\n\r\nThe easiest way to avoid that is to add a [[tagging|tag]] that makes these windows sticky:
<pre>{{hide}}<code sticky:\r\n\r\n<pre>{{hide}}<code class="ruby">tag "flash" do
do\r\n match "<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"
"<unknown>|plugin-container|exe|operapluginwrapper|npviewer.bin"\r\n stick true
end</code></pre> true\r\nend</code></pre>
h2. What is the difference between ViewSwitch and ViewJump?
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.
h2. more.\r\n\r\nh2. Single screen
Here screen\r\n\r\nHere both [[grabs]] do +exactly+ the same.
h2. same.\r\n\r\nh2. Multi screen
Here screen\r\n\r\nHere the behavior depends on if the selected [[views|view]] is visible on another [[screens|screen]] or not.
* not.\r\n\r\n* *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]].
* [[screens|screen]].\r\n* *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]].
h2. Why does program XYZ appears/turns as/to a gray canvas?
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.
There those.\r\n\r\nThere are two possible ways:
# ways:\r\n\r\n# Enable size hints globally with the _:resize_ option
option\r\n <pre>{{hide}}<code class="ruby">set :resize, true</code></pre>
# true</code></pre>\r\n# Enable this per program via [[tagging|tag]]
[[tagging|tag]]\r\n <pre>{{hide}}<code class="ruby">tag "name" do
do\r\n match "name"
"name"\r\n resize true
end</code></pre>
bq. true\r\nend</code></pre>\r\n\r\nbq. Note: This can happen with "Java":http://java.com too, see "here":http://subforge.org/ezfaq/show/subtle?faq_id=14 for more information.
h2. How do I run a Java program?
"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.
If canvas.\r\n\r\nIf this happens just try to start your program like this:
<pre><code this:\r\n\r\n<pre><code class="shell">AWT_TOOLKIT=MToolkit program</code></pre>
This program</code></pre>\r\n\r\nThis 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:
<pre><code behaviour:\r\n\r\n<pre><code class="shell">_JAVA_AWT_WM_NONREPARENTING=1 program</code></pre>
In program</code></pre>\r\n\r\nIn 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 wm.\r\n\r\nSince r2520 [[subtle]] can do that for you, just enable the *:wmname* option.
Generally option.\r\n\r\nGenerally this problem is really long lasting, see here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650
bq. \r\n\r\nhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6511454\r\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508650\r\n\r\nbq. 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.
"OpenJDK":http://openjdk.java.net.\r\n\r\n
h2. How do I tag console based programs?
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.
The tagging.\r\n\r\nThe 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@
Another irssi@\r\n\r\nAnother problem is that terminals retain their class value (second string) of the *WM_CLASS* and may match other [[tagging|tags]] like:
<pre><code like:\r\n\r\n<pre><code class="ruby">tag "terms" do
do\r\n match "urxvt"
end</code></pre>
The "urxvt"\r\nend</code></pre>\r\n\r\nThe 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:
<pre><code this:\r\n\r\n<pre><code class="ruby">tag "irssi" do
do\r\n match :instance => "irssi"
end</code></pre>
Following "irssi"\r\nend</code></pre>\r\n\r\nFollowing table shows the *WM_NAME* and *WM_CLASS* output of "xprop":http://www.xfree86.org/current/xprop.1.html of the various combinations:
|_. combinations:\r\n\r\n|_. Command |_. WM_NAME |_. WM_CLASS |
| |\r\n| urxvt | urxvt | urxvt, URxvt |
| |\r\n| urxvt -e irssi | irssi | urxvt, URxvt |
| |\r\n| urxvt -name irssi | urxvt | irssi, URxvt |
| |\r\n| urxvt -name irssi -e irssi | irssi | irssi, URxvt |
Please |\r\n\r\nPlease have a look at the [[Tagging|tagging wiki page]] for more information.
information.\r\n\r\n\r\n
h2. How can I use subtle without numpad?
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.
Keys \r\n\r\nKeys that also have proven to work well are *q-w-e*, *a-s-d* and *y-x-c*:
<pre>{{hide}}<code *y-x-c*:\r\n\r\n<pre>{{hide}}<code class="ruby">grab "W-q", [ :top_left, :top_left66, :top_left33 ]
grab ]\r\ngrab "W-w", [ :top, :top66, :top33 ]
grab ]\r\ngrab "W-e", [ :top_right, :top_right66, :top_right33 ]
grab ]\r\ngrab "W-a", [ :left, :left66, :left33 ]
grab ]\r\ngrab "W-s", [ :center, :center66, :center33 ]
grab ]\r\ngrab "W-d", [ :right, :right66, :right33 ]
# QWERTZ
grab ]\r\n\r\n# QWERTZ\r\ngrab "W-y", [ :bottom_left, :bottom_left66, :bottom_left33 ]
# QWERTY
grab ]\r\n\r\n# QWERTY\r\ngrab "W-z", [ :bottom_left, :bottom_left66, :bottom_left33 ]
grab ]\r\n\r\ngrab "W-x", [ :bottom, :bottom66, :bottom33 ]
grab ]\r\ngrab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
</code></pre>
You ]\r\n</code></pre>\r\n\r\n\r\nYou can find more about assigning keys [[Grabs|here]].
h2. How does subtle match clients?
[[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.
There \r\nThere are several ways to get these values, here are the most common:
Select common:\r\n\r\nSelect 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:
<pre><code this:\r\n\r\n<pre><code class="bash">{{color(#0000ff, WM_NAME)}}(STRING) = "urxvt"
{{color(#ff0000, "urxvt"\r\n{{color(#ff0000, WM_CLASS)}}(STRING) = {{color(#aa0000, "irssi")}}, {{color(#ff00ff, "URxvt")}}</code></pre>
Run "URxvt")}}</code></pre>\r\n\r\nRun *[[subtler]] -cl* and look for the matching line:
<pre><code line:\r\n\r\n<pre><code class="bash">0x800007 * 1 1020x374 2 1 --- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})</code></pre>
h2. Is subtle a reparenting window manager?
*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.
Reparenting update.\r\n\r\nReparenting windows would require following additional steps, when a window is visible on a certain [[views|view]]:
# [[views|view]]:\r\n\r\n# Resize the [[views|view]] toplevel window to the size of the current [[screen]]
# [[screen]]\r\n# Reparent the [[client]] window to the toplevel window
# window\r\n# Handle (ignore here) the generated expose and crossing events
Probably events\r\n\r\nProbably 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:
bq. "ICCCM":http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1:\r\n\r\nbq. 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
h2. How do I move a program to another view?
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]].
h2. subtler
[[subtler]] [[subtlext]].\r\n\r\nh2. subtler\r\n\r\n[[subtler]] can be used on the commandline:
<pre>{{hide}}<code class="ruby">
subtler commandline:\r\n\r\n<pre>{{hide}}<code class="ruby">\r\nsubtler -ta tag #< Add new tag 'tag'
subtler 'tag'\r\nsubtler -cT client tag #< Tag client 'client' with tag 'tag'
subtler 'tag'\r\nsubtler -vT view tag #< Tag view 'view' with tag 'tag'
</code></pre>
h2. subtlext
[[subtlext]] 'tag'\r\n</code></pre>\r\n\r\nh2. subtlext\r\n\r\n[[subtlext]] requires basic "ruby":http://ruby-lang.org knowledge:
<pre>{{hide}}<code knowledge:\r\n\r\n<pre>{{hide}}<code class="ruby">require "subtle/subtlext"
tag "subtle/subtlext"\r\n\r\ntag = Subtlext::Tag.new("tag").save #< Add new tag 'tag'
Subtlext::Client["client"] 'tag'\r\nSubtlext::Client["client"] + "tag" #< Tag client 'client' with tag 'tag'
Subtlext::View["view"] 'tag'\r\nSubtlext::View["view"] + "tag" #< Tag view 'view' with tag 'tag'
</code></pre>
h2. Snippets
The 'tag'\r\n</code></pre>\r\n\r\nh2. Snippets\r\n\r\nThe [[snippets]] wiki page includes examples how to [[snippets#Move-windows|move to another view]].
h2. Contrib
h3. Vitag
"subtle-contrib":http://subforge.org/projects/subtle-contrib/wiki view]].\r\n\r\nh2. Contrib\r\n\r\nh3. Vitag\r\n\r\n"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.
h3. Launcher
The editor.\r\n\r\nh3. Launcher\r\n\r\nThe "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]].
h2. Stick
Most [[tagging|tags]].\r\n\r\nh2. Stick\r\n\r\nMost 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@)
-cXS@)\r\n\r\n
h2. What is required for the volume sublet?
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.
{{info(Please file.\r\n\r\n{{info(Please check to the docs of your distribution how to do it.)}}
<pre><code>modprobe snd_mixer_oss</code></pre>
{{warn(Following it.)}}\r\n\r\n<pre><code>modprobe snd_mixer_oss</code></pre>\r\n\r\n{{warn(Following explanation is technical!)}}
The technical!)}}\r\n\r\nThe [[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.
Since mainloop.\r\n\r\nSince 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.