feat: gnome wacom configuration
Get remarkable mouse to work with the normal wacom tablet settings in gnome control center
I can rebase this to drop the merge commit if it's desired.
Let's auto install the config on startup.
Something like this would go inside remarkable_mouse.py if --evdev is used:
from pathlib import Path
import shutil
libwacom = Path('/usr/share/libwacom')
config = Path(__file__).joinpath('remarkable.tablet')
dest_config = libwacom.joinpath('remarkable.tablet')
if libwacom.exists() and not dest_config.exists():
shutil.copy(config, dest_config)
You'll need to adjust setup.py so that remarkable.tablet ships with the distribution. Example: https://github.com/Evidlo/passhole/blob/master/setup.py#L10
Rewriting my comment after re-reading your comment:
Isn't it a bit odd to copy the file on start rather that copy on install? Should we be concerned about writing to the system directories when the user might not expect it? Should we overwrite existing install on re-install? Should we implement the libwacom file install as a separate script?
Any thought's on those items before I implement the install step?
Isn't it a bit odd to copy the file on start rather that copy on install?
I've asked this question when installing config files for other CLI programs I've written and the advice I've always gotten is to install these files at runtime.
Should we be concerned about writing to the system directories when the user might not expect it?
As long as you do it in a responsible way, it should be fine. Just check if the file already exists.
Should we overwrite existing install on re-install?
I would say no.
Should we implement the libwacom file install as a separate script?
I say keep things simple for the user.
I can merge this as soon as the changes are implemented.
I haven't had time to address the PR comments unfortunately. I'll put it in my queue of things I might do this weekend, but I don't know how likely it is.
~I should mention, I didn't manage to get this working...~ oops, just needed a reboot.
I am curious if it's possible to capture the buttons to use them for the stylus button one and two, as that's the only feature really missing for me.
I am curious if it's possible to capture the buttons to use them for the stylus button one and two, as that's the only feature really missing for me.
Might be possible, though that should go in a separate issue.
I've asked this question when installing config files for other CLI programs I've written and the advice I've always gotten is to install these files at runtime.
I would argue that the keyword here is config, but remarkable.tablet isn't meant to be edited by the user, and therefore it's not a config file and should be installed at setup, not first run.