Module: ruled.clipboard
Rules for the clipboard selection.
Info:
- Copyright: 2019 Emmanuel Lepage Vallee
-
Originally authored by: Emmanuel Lepage Vallee <elv1313@gmail.com>
(Full contributors list available on our github project)
Functions
ruled.clipboard.remove_rule_source (name) | Remove a source. | |
ruled.clipboard.apply (c) | Apply the tag rules to a client. | |
ruled.clipboard.append_rule (table) | Add a new rule to the default set. | |
ruled.clipboard.append_rules (table) | Add a new rules to the default set. | |
ruled.clipboard.remove_rule (table) | Remove a new rule to the default set. | |
ruled.clipboard.get_or_create_by_name (name, screen, args) | Return an existing dynamic tag or create one. | |
awful.tag.rules.add_rule_source (name, callback, depends_on, precede) | Add a new rule source. |
Rule matching properties
area_count | The current number of (physical) monitor areas. | |
area_name | The name of the area. | |
area_mm_width | The physical width of the area. | |
area_mm_heihgt | The physical height of the area. | |
minimum_dpi | The least dense DPI of the area. | |
maximum_dpi | The least dense DPI of the area. | |
preferred_dpi | The least dense DPI of the area. |
Functions
Methods- ruled.clipboard.remove_rule_source (name)
-
Remove a source.
Parameters:
- name string The source name.
Returns:
-
boolean
If the source was removed,
- ruled.clipboard.apply (c)
-
Apply the tag rules to a client.
This is useful when it is necessary to apply rules after a tag has been created. Many workflows can make use of "blank" tags which wont match any rules until later.
Parameters:
- c client The client.
- ruled.clipboard.append_rule (table)
-
Add a new rule to the default set.
Parameters:
- table rule A valid rule.
- ruled.clipboard.append_rules (table)
-
Add a new rules to the default set.
Parameters:
- table rule A table with rules.
- ruled.clipboard.remove_rule (table)
-
Remove a new rule to the default set.
Parameters:
- table rule A valid rule.
- ruled.clipboard.get_or_create_by_name (name, screen, args)
-
Return an existing dynamic tag or create one.
Parameters:
- name
- screen
- args
Returns:
-
tag or nil
A tag or nil if the name doesn't exist.
- awful.tag.rules.add_rule_source (name, callback, depends_on, precede)
-
Add a new rule source.
A rule source is a provider called when a client initially request tags. It allows to configure, select or create a tag (or many) to be attached to the client.
Parameters:
- name string The provider name. It must be unique.
- callback The callback that is called to produce properties.
- depends_on table A list of names of sources this source depends on (sources that must be executed before
name
. (default {})- precede table A list of names of sources this source have a priority over. (default {})
Returns:
-
boolean
Returns false if a dependency conflict was found.
Rule matching properties
- area_count
-
The current number of (physical) monitor areas.
Type:
- number
- area_name
-
The name of the area.
Note that this only works in the
except_any
orrule_any
section because an area can have multiple outputs.Type:
- string
- area_mm_width
-
The physical width of the area.
Note that this only works in the
except_any
orrule_any
section because an area can have multiple outputs.Type:
- numner
- area_mm_heihgt
-
The physical height of the area.
Note that this only works in the
except_any
orrule_any
section because an area can have multiple outputs.Type:
- string
- minimum_dpi
-
The least dense DPI of the area.
Type:
- number
- maximum_dpi
-
The least dense DPI of the area.
Type:
- number
- preferred_dpi
-
The least dense DPI of the area.
Type:
- number