Project

General

Profile

unexist.dev

Assorted tidbits and projects

Views » History » Version 5

« Previous - Version 5/9 (diff) - Next » - Current version
Christoph Kappel, 01/23/2018 12:24 PM


Views

Views 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.

There are two ways to define a view in the config:

Simple

The simple way just needs a name and a regular expression (see regex) to create a view:

view "view", "tag"

Extended

Like tags, views can have additionally properties to set a different mode or even add an icon.

view "view" do
  match   "xterm|[u]?rxvt" 
  gravity :center
end

Default

The 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.

Properties

Following properties exist:

Icon

This property add an icon to the view name in the panel.

Example:

view "terms" do
  match "urxvt" 
  icon  "/usr/share/icons/icon.xbm" 
end

{{info(You can also pass a Subtlext::Icon object to icon instead of a path.)}}

Icon_only

This property hides the view name from the panel when an icon is used.

Example:

view "terms" do
  icon      "/usr/share/icons/icon.xbm" 
  icon_only true
end

Dynamic

This property hides views that aren't occupied by clients from the panel.

Example:

view "terms" do
  dynamic true
end

{{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.)}}

Match

This property works like the simple tag matching, but matches tag names instead of actual client properties.

view "terms" do
  match   "urxvt" 
end