Project

General

Profile

unexist.dev

Assorted tidbits and projects

Views » History » Version 7

« Previous - Version 7/9 (diff) - Next » - Current version
Christoph Kappel, 02/02/2018 10:13 AM


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.

Options

Following options exist:

Set

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

view "modes" do
  match "xterm" 
  set   :dynamic, :icons_only
end

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

Match

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

view "terms" do
  match   "urxvt" 
end

Modes

Following modes exist:

Dynamic

Enable dynamic mode for views. When set, icons of unoccupied views (views that display no windows) are hidden.

Example:

view "terms" do
  set :dynamic
end

Icon_only

Enable icon only mode. When set, subtle hides the view name from the view buttons, just the icon will be visible.

Example:

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