|
From: Alexia D. <ale...@gm...> - 2010-05-24 07:08:53
|
On Mon, May 24, 2010 at 5:47 AM, Peter Hutterer <pet...@wh...> wrote: > Now, what we need to decide on though is which path to chose for the extra > information (this patch implements both). > Approach 1 is to append the type to the product name - as we do with the > device name. So if the device has a product name of "Wacom Intuos", the > eraser will have a product name of "Wacom Intuos eraser". > This would lead to the following configuration: > Section "InputClass" > Identifier "Wacom eraser class" > MatchProduct "Wacom" > MatchProduct "eraser" > Option "Foo" "bar" > EndSection > > MatchProduct doesn't do regex, so a match of "Wacom*eraser" won't work, it > has to be two different lines. > The MatchProduct "Wacom" is just there so other devices that may have > "eraser" in their name won't get matched. > This is the better option I think.Think of the case of two erasers on one Intuos, a task I'm yet to tackle . The type would need to be present in the name anyway to ensure uniqueness. It will make very much sense to have identifiers like: "Wacom Intuos airbrush eraser" where airbrush is the name set for a specific pen, so I know in GIMP and elsewhere what I'm configuring. This leads to wanting to configure it specifically so it only makes sense to have MatchProduct "Wacom Intuos airbrush eraser" in the sniplet. > > Approach 2 is to append the type to the tags (tags are arbitrary names > assigned to devices by the config backend that can be mached against). > This would lead to the following configuration: > Section "InputClass" > Identifier "Wacom eraser class" > MatchProduct "Wacom" > MatchTag "eraser" > Option "Foo" "bar" > EndSection This would essentially block my ability to configure a specific non-type defined dependent device unless the dependent device name is somehow replicated in the tags and that is neither straightforward nor obvious from the user pov. -- --Alexia |