Tagging » History » Version 16
« Previous -
Version 16/66
(diff) -
Next » -
Current version
Anonymous, 09/26/2009 01:01 PM
Tags\015\012\015\012Tags are generally used in subtle for placement of windows. This placement is strict, that means that - aside from other tiling window managers - windows must have a matching tag to be on a certain view. This also includes that windows that are started on a certain view will not automatically be placed there.\015\012\015\012There are to ways to define a tag in the config:\015\012* with a string\015\012"tag" => "xterm"\015\012
\015\012* with a hash of properties\015\012\015\012"tag" => { :regex => "xterm|[u]?rxvt", :gravity => 5 }\015\012
\015\012\015\012h2. Default\015\012\015\012Whenever a window has no tag it will get the default tag and be placed on the default view. The default view can either be set by the user with adding the default tag to a view by choice or otherwise the first defined view will be chosen automatically.\015\012\015\012Example:\015\012\015\012\015\012 VIEWS = [\015\012 { "terms" => "terms" },\015\012 { "www" => "default|browser" },\015\012 { "dev" => "editor" }\015\012]\015\012
\015\012\015\012h2. Properties\015\012\015\012Additionally tags can do a lot more then just control the placement - they also have properties than can define and control some aspects of a window like the default gravity or the default screen per view.\015\012\015\012h3. float\015\012\015\012This property either sets the tagged client floating or prevents it from being floating depending on the value.\015\012\015\012"float" => { :regex => "xterm", :float => true }\015\012"nofloat" => { :regex => "xterm", :float => false }\015\012
\015\012\015\012h3. full\015\012\015\012This property either sets the tagged client to fullscreen or prevents it from being set to fullscreen depending on the value.\015\012\015\012"full" => { :regex => "xterm", :full => true }\015\012"nofull" => { :regex => "xterm", :full => false }\015\012
\015\012\015\012h3. gravity\015\012\015\012This property sets a certain to gravity to the tagged client, but only views that have this tag too.\015\012\015\012"gravity" => { :regex => "xterm", :gravity => 8 }\015\012
\015\012\015\012h3. match\015\012\015\012This property influcences the matching of tags, per default tags will only match the WM_NAME and the WM_CLASS portion of a client. \015\012\015\012Match expects an array with following possible values:\015\012* :title - match the title which is also visible in the panel\015\012* :name - match the {{color(#ff0000, WM_NAME)}}\015\012* :class - match the {{color(#0000ff, WM_CLASS)}}\015\012\015\012There are several ways to get these values, here are the most common:\015\012\015\012* xprop: Just select the window and have a look for the WM_CLASS line which usually look like this:\015\012\015\012p{class:pre}. WM_CLASS(STRING) = "{{color(#ff0000, urxvt)}}", "{{color(#0000ff, URxvt)}}")\015\012\015\012* subtler: Run subtler cl and look for the matching line:\015\012\015\012p{class:pre}. 0x800007 * 1 1020x374 2 1 -- {{color(#ff0000, urxvt)}} ({{color(#0000ff,URxvt)}})\015\012\015\012\015\012"match" => { :regex => "xterm", :match => [ :title, :class ] }\015\012
\015\012\015\012h3. regex\015\012\015\012h3. screen\015\012\015\012h3. size\015\012\015\012h3. stick\015\012\015\012h3. urgent\015\012\015\012{{tocnavi(subtle,Grabs,Quickstart,Gravity)}}¶
\015\012"tag" => "xterm"\015\012
\015\012"tag" => { :regex => "xterm|[u]?rxvt", :gravity => 5 }\015\012
\015\012 VIEWS = [\015\012 { "terms" => "terms" },\015\012 { "www" => "default|browser" },\015\012 { "dev" => "editor" }\015\012]\015\012
\015\012"float" => { :regex => "xterm", :float => true }\015\012"nofloat" => { :regex => "xterm", :float => false }\015\012
\015\012"full" => { :regex => "xterm", :full => true }\015\012"nofull" => { :regex => "xterm", :full => false }\015\012
\015\012"gravity" => { :regex => "xterm", :gravity => 8 }\015\012
\015\012"match" => { :regex => "xterm", :match => [ :title, :class ] }\015\012