DeviceRule¶
Applies a set properties to all devices that satisfy the rule’s conditions.
Configuration¶
Properties¶
Property |
Type |
Description |
|---|---|---|
conditions |
Must be satisfied in order for the rule to be applied. |
All properties of the rule other then the ones listed above are device properties that the rule will apply.
Examples¶
device_rules:
- conditions:
any:
- $name == Synaptics TM3276-02
- $name contains Logitech
ignore: false # don't ignore this device, overrides the rule below
- conditions: $name == Logitech G502 X
motion_threshold: 30
- conditions: $mouse
press_timeout: 300
unblock_buttons_on_timeout: false
- ignore: true # ignore all devices by default
Conditions¶
Device rule conditions use a separate set of variables that describe the device for which a rule is currently being evaluated. Global variables are not accessible here.
Name |
Type |
Description |
|---|---|---|
name |
string |
|
types |
flags(keyboard, mouse, touchpad, touchscreen) |
Certain devices may have multiple types (e.g. mouse and keyboard). |
keyboard |
bool |
Whether the device is a keyboard. |
mouse |
bool |
Whether the device is a mouse. |
touchpad |
bool |
Whether the device is a touchpad. |
touchscreen |
bool |
Whether the device is a touchscreen. |