On Wed, Feb 23, 2011 at 2:55 PM, Favux ... <[email protected]> wrote:
> On Wed, Feb 23, 2011 at 10:03 AM, Chris Bagwell <[email protected]> wrote:
>> On Tue, Feb 22, 2011 at 11:36 PM, Peter Hutterer
>> <[email protected]> wrote:
>>>
>>> why don't we add this information to the man page?
>>> if only half the time that is spent on writing scripts to hack things up
>>> would be spent on proper documentation in the driver we wouldn't need the
>>> scripts in the first place...
>>
>> Agree with this point. And I've come to enjoy improvements to xinput
>> list-props were it only shows values that make sense for current tool
>> (or xsetwacom equivalent).
>
> So we want the user to read man wacom, xsetwacom, xinput and then
> assemble their own script combining xsetwacom and xinput? I agree
> that the xinput improvements are welcomed and proving useful and I've
> added xinput commands to my scripts.
>
>>
>> I've looked at the screenshot but not code yet. :-) I'm waiting on
>> that "UI designer" as well. I'm always leery of hacking on something
>> when I know someone is going to come back and say "it needs just one
>> button on the screen that says 'make it work' and get rid of the
>> rest"... and make most the time useless.
>>
>
> Getting UI input is proving problematic.
>
>> Are these bash scripts?
>
> They are an imititation of wacomcpl's .xinitrc, except organized into
> input tool sections and minus at the end of the script:
> # run the primary system script
> . /etc/X11/xinit/xinitrc
>
> Which is the old X script chain.
>
>> For the cosmetic name changes, you can use
>> associative arrays to hide some of this.
>>
>> declare -A name_remap
>> if [ $xsetwacom_version -qt 2 ]; then
>> $name_remap["ClickForce"]="Threshold"
>> else
>> $name_remap["ClickForce"]="ClickForce"
>> fi
>>
>> xsetwacom $STYLUS $name_remap["ClickForce"] 27
>>
>> Of course, how to set xsetwacom_version is a little tricky. My idea
>> above is to remap the 0.10.x type version #'s to an easier to parse
>> integer. For versions of xsetwacom that have same interface, they map
>> to same integer value.
>>
>> Partial example:
>>
>> case `xsetwacom -V | awk 'NR==1{print $1}' in
>> 0.10.1|0.10.2) xsetwacom_version=1;;
>> 0.10.11|*) xsetwacom_version=2;;
>> esac
>
> Fair enough, and good ideas. But rather than blowing the users mind
> on exposure to this wouldn't an interface hiding this be better?
> While some Wacom users have put in the time to learn the xsetwacom
> interface that doesn't mean they've learned BASH scripting, or want
> to.
>
OK. I guess I'm missing parts of this topic. Sometimes it sounds
like these are examples only but other times it sounds like its meant
to be ran by some daemon backend or similar during hotplugs.
If they are ever meant to be plugged into a backend then I'd assume
most the hard stuff like xsetwacom_version or $STYLUS are
automatically set for user. But then again, I'd go the easier route
for user and just have them set things like:
TOUCH_THRESHOLD=27
STYLUS_PRESSURECURVE=0 0 100 100
STYLUS_THRESHOLD=27
Then user doesn't even now they are really a bash script and looks
dangerously close to windows *.INI they may already be familiar with
for same types of stuff.
At plugin time, source the above file, and start updating everything
optionally and one by one:
if xinput list | grep $HOTPLUG_NAME | grep touch; then
TOUCH="$HOTPLUG_NAME touch"
fi
if [ "${TOUCH}x" != "x" ]; then
if [ "${TOUCH_THRESHOLD" != "x" ]; then
xsetwacom $TOUCH $threshold_name[$xsetwacom_version] $TOUCH_TRESHOLD
fi
fi
Then you are at long term easier to maintain all-in-one script as
Peter suggestions.
But I think I must be missing overall intent here.
Chris
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel