Tiny Core Extensions > TCE News

AutoCursor extension submitted

<< < (4/7) > >>

jazzbiker:
Hi, Rich!

Now AutoCursor works without any issues. Any configuration of hiding and showing devices can be described and provided. But if some time You will be in the mood to introduce some changes into it, I have the proposal for You.

Now the sequence of actions is the following:
1. Processing "h" and "s" parameters, catching "L" and "S" names.
2. Saving supplied "h" and "s" values in the "S" name.
3. If present, load "L" name and, thereby, forgetting supplied int the command line values.

I think, sometimes it would be convenient to change the sequence:
1. as before
2. Loading, if present, "L" file and appending values in it to the existing list of command line "h" and "s" values.
3. If needed, save the resulting list to the "S" file.

What can You say about?

Rich:
Hi jazzbiker
I'm not going to check for and support every possible combination of load, save, and command line switches.
This is a utility that typically would get run once or twice to set it up, and then launched automatically from ~/.X.d.
I did make 2 changes. I adjusted file permissions to 666 when saving settings. This way you don't need to be root to edit it.
I added a  -A  switch that will cause the program to  append  rather than  overwrite  when saving settings.

This will append the command line settings to AutoCursor.conf but run with the command line settings.

--- Code: ---sudo AutoCursor -hX -sY -A -S AutoCursor.conf
--- End code ---

This will append the command line settings to AutoCursor.conf and then load AutoCursor.conf.

--- Code: ---sudo AutoCursor -hX -sY -A -S AutoCursor.conf -L ~/.config/AutoCursor.conf
--- End code ---

The updated extension has been posted.

jazzbiker:

--- Quote from: Rich on February 01, 2021, 01:22:53 AM ---I added a  -A  switch that will cause the program to  append  rather than  overwrite  when saving settings.

--- End quote ---

Hi, Rich!

Thanks for update! Now AutoCursor became even more convenient!

jazzbiker:
Hi, Rich!

Device properties (ID_INPUT_MOUSE, ID_INPUT_KEYBOARD, ID_INPUT_TOUCHPAD, ID_INPUT_TOUCHSCREEN) can be quered with

--- Code: ---udevadm info -q property -p /sys/class/input/eventX | grep -q ID_INPUT_MOUSE

--- End code ---

device names can be read with

--- Code: ---cat /sys/class/input/eventX/device/name

--- End code ---
and probably .conf file for AutoCursor can be produced according to this information.

jazzbiker:
Hi, Rich and AutoCursor users!

        I'm attaching the script for auto-configuring AutoCursor. Its main purpose is nomadic use, of course, allowing avoid manual configuring on the newly visited machine. Script is very simple, no options, help or versions, the only command line parameter possible is the path to configuration file. Of course, it can be omitted in favour of default ~/.autocursor.conf. If devices found are already described in the existing configuration file, they are leaved unchanged. If some device is not yet present, the description with appropriate AutoCursor command (h or s) is appended.
        I have no touchscreen to test with TinyCore, so if anyone is able to test the script it will be interesting to know about the results, whether the "h" command will be assigned to it in the configuration file.

Regards!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version