Views » History » Version 2
« Previous -
Version 2/9
(diff) -
Next » -
Current version
Anonymous, 06/24/2011 02:37 PM
Views\015\012\015\012{{>toc}}\015\012\015\012Views are the virtual desktops in subtle and they display matching clients based on tags. In comparison to the matching in tags, views match tag names.\015\012\015\012There are two ways to define a view in the config:\015\012\015\012h2. Simple\015\012\015\012The simple way just needs a name and a regular expression (see regex) to create a view:\015\012\015\012view "view", "tag"
\015\012\015\012h2. Extended\015\012\015\012Like tags, views can have additionally properties to set a different mode or even add an icon.\015\012\015\012{{hide}}\015\012view "view" do\015\012 match "xterm|[u]?rxvt"\015\012 gravity :center\015\012end\015\012
\015\012\015\012h2. Default\015\012\015\012The default view can either be set by adding the default tag to a view by choice or otherwise the first defined view is chosen automatically.\015\012\015\012h2. Properties\015\012\015\012Following properties exist:\015\012\015\012h3. Icon\015\012\015\012This property add an icon to the view name in the panel.\015\012\015\012Example:\015\012\015\012{{hide}}view "terms" do\015\012 match "urxvt"\015\012 icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")\015\012end
\015\012\015\012h3. Icon_only\015\012\015\012This property hides the view name from the panel when an icon is used.\015\012\015\012Example:\015\012\015\012{{hide}}view "terms" do\015\012 icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")\015\012 icon_only true\015\012end
\015\012\015\012h3. Dynamic\015\012\015\012This property hides views that aren't occupied by clients from the panel.\015\012\015\012Example:\015\012\015\012{{hide}}view "terms" do\015\012 dynamic true\015\012end
\015\012\015\012{{warn(subtle doesn't change the numbering of the views, that means when there are three views and the second is dynamic the third is still the third.)}}\015\012\015\012h3. Match\015\012\015\012This property works like the simple tag matching, but matches tag names instead of actual client properties.\015\012\015\012{{hide}}view "terms" do\015\012 match "urxvt"\015\012end
\015\012\015\012¶
view "view", "tag"
\015\012view "view" do\015\012 match "xterm|[u]?rxvt"\015\012 gravity :center\015\012end\015\012
view "terms" do\015\012 match "urxvt"\015\012 icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")\015\012end
view "terms" do\015\012 icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")\015\012 icon_only true\015\012end
view "terms" do\015\012 dynamic true\015\012end
view "terms" do\015\012 match "urxvt"\015\012end