Project

General

Profile

unexist.dev

subtle

Assorted tidbits and projects

Views » History » Version 7

Version 6 (Christoph Kappel, 02/02/2018 09:01 AM) → Version 7/9 (Christoph Kappel, 02/02/2018 10:13 AM)

h1. Views

{{>toc}}

[[Views]] are the virtual desktops in [[subtle]] and they display [[Tagging|matching]] [[clients]] based on [[tagging|tags]]. In comparison to the [[Tagging|matching]] in [[Tagging|tags]], [[Views|views]] match [[Tagging|tag names]].

There are two ways to define a [[Views|view]] in the [[config]]:

h2. Simple

The simple way just needs a name and a "regular expression":http://en.wikipedia.org/wiki/Regular_expression (see "regex(7)":http://linux.die.net/man/7/regex) to create a [[Views|view]]:

<pre><code class="ruby">view "view", "tag"</code></pre>

h2. Extended

Like [[Tagging|tags]], [[Views|views]] can have additionally properties to set a different mode or even add an icon.

<pre><code class="ruby">
view "view" do
match "xterm|[u]?rxvt"
gravity :center
end
</code></pre>

h2. Default

The +default+ [[Views|view]] can either be set by adding the +default+ [[Tagging|tag]] to a [[Views|view]] by choice or otherwise the first defined [[Views|view]] is chosen *automatically*.

h2. Options Properties

Following options properties exist:

h3. Set

Set various [[Views#Modes|modes] for [[views]]. Multiple modes can be set separated by comma.

<pre><code class="ruby">
view "modes" do
match "xterm"
set :dynamic, :icons_only
end
</code></pre>

h3.
Icon

This property add an icon to the [[Views|view]] name in the [[Panel|panel]].

Example:

<pre><code class="ruby">view "terms" do
match "urxvt"
icon "/usr/share/icons/icon.xbm"
end</code></pre>

{{subforge_info(You can also pass a "Subtlext::Icon":http://rdoc.subforge.org/subtle/classes/Subtlext/Icon.html object to *icon* _instead_ of a path.)}}

h3. Match Icon_only

This property works like hides the [[Tagging#Simple|simple tag matching]], but matches [[Tagging|tag names]] *instead* of actual [[Clients|client]] properties. [[Views|view]] name from the [[Panel|panel]] when an icon is used.

Example:

<pre><code class="ruby">view "terms" do
match "urxvt" icon "/usr/share/icons/icon.xbm"
set :icon_only

end</code></pre>

h2. Modes

Following modes exist:

h3. Dynamic

Enable dynamic mode for [[views]]. When set, icons of unoccupied [[views]] ([[views]] This property hides [[Views|views]] that display no windows) are hidden. aren't occupied by [[Clients|clients]] from the panel.

Example:

<pre><code class="ruby">view "terms" do
set :dynamic
end</code></pre>

{{subforge_warn([[subtle]] *doesn't* change the numbering of the [[Views|views]] yet, [[Views|views]], that means when there are three [[Views|views]] and the second is [[Views#Dynamic|dynamic]] the third is *still* the third.)}}

h3. Icon_only Match

Enable icon only mode. When set, [[subtle]] hides This property works like the [[views|view]] name from the [[views|view]] buttons, just the icon will be visible. [[Tagging#Simple|simple tag matching]], but matches [[Tagging|tag names]] *instead* of actual [[Clients|client]] properties.

Example:

<pre><code class="ruby">view "terms" do
icon "/usr/share/icons/icon.xbm"
set :icon_only
match "urxvt"
end</code></pre>