add photo, ssh connection message
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
dist/
|
dist/
|
||||||
remarkable_mouse.egg-info
|
remarkable_mouse.egg-info
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
|
build/
|
||||||
@@ -4,6 +4,8 @@ Use your reMarkable as a graphics tablet.
|
|||||||
|
|
||||||
Special thanks to [canselcik](https://github.com/canselcik/libremarkable) and [LinusCDE](https://github.com/LinusCDE/rmWacomToMouse) for inspiration.
|
Special thanks to [canselcik](https://github.com/canselcik/libremarkable) and [LinusCDE](https://github.com/LinusCDE/rmWacomToMouse) for inspiration.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
@@ -13,9 +15,13 @@ remouse
|
|||||||
|
|
||||||
By default, `10.11.99.1` is used as the address. Seems to work pretty well wirelessly, too.
|
By default, `10.11.99.1` is used as the address. Seems to work pretty well wirelessly, too.
|
||||||
|
|
||||||
# Passwordless login
|
# Examples
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
|
# specify address, monitor, orientation, password
|
||||||
|
remouse --address 192.168.1.1 --orientation right --monitor 1 --password foobar
|
||||||
|
|
||||||
|
# pubkey login
|
||||||
ssh-keygen -f ~/.ssh/remarkable -N ''
|
ssh-keygen -f ~/.ssh/remarkable -N ''
|
||||||
ssh-copy-id -i ~/.ssh/remarkable.pub root@10.11.99.1
|
ssh-copy-id -i ~/.ssh/remarkable.pub root@10.11.99.1
|
||||||
remouse --key ~/.ssh/remarkable
|
remouse --key ~/.ssh/remarkable
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ def open_eventfile(args):
|
|||||||
pkey=pkey,
|
pkey=pkey,
|
||||||
look_for_keys=False
|
look_for_keys=False
|
||||||
)
|
)
|
||||||
|
print("Connected to {}".format(args.address))
|
||||||
|
|
||||||
# Start reading events
|
# Start reading events
|
||||||
_, stdout, _ = client.exec_command('cat /dev/input/event0')
|
_, stdout, _ = client.exec_command('cat /dev/input/event0')
|
||||||
@@ -150,26 +151,26 @@ def read_tablet(args):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="use reMarkable tablet as a mouse input")
|
try:
|
||||||
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right'])
|
parser = argparse.ArgumentParser(description="use reMarkable tablet as a mouse input")
|
||||||
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use")
|
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right'])
|
||||||
parser.add_argument('--offset', default=(0, 0), type=int, metavar=('x', 'y'), nargs=2, help="offset mapped region on monitor")
|
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use")
|
||||||
parser.add_argument('--debug', action='store_true', default=False, help="enable debug messages")
|
parser.add_argument('--offset', default=(0, 0), type=int, metavar=('x', 'y'), nargs=2, help="offset mapped region on monitor")
|
||||||
parser.add_argument('--key', type=str, metavar='PATH', help="ssh private key")
|
parser.add_argument('--debug', action='store_true', default=False, help="enable debug messages")
|
||||||
parser.add_argument('--password', default=None, type=str, help="ssh password")
|
parser.add_argument('--key', type=str, metavar='PATH', help="ssh private key")
|
||||||
parser.add_argument('--address', default='10.11.99.1', type=str, help="device address")
|
parser.add_argument('--password', default=None, type=str, help="ssh password")
|
||||||
args = parser.parse_args()
|
parser.add_argument('--address', default='10.11.99.1', type=str, help="device address")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.debug:
|
if args.debug:
|
||||||
print('Debugging enabled...')
|
print('Debugging enabled...')
|
||||||
logging.getLogger('').setLevel(logging.DEBUG)
|
logging.getLogger('').setLevel(logging.DEBUG)
|
||||||
log.setLevel(logging.DEBUG)
|
log.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
read_tablet(args)
|
read_tablet(args)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
main()
|
||||||
main()
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = '1'
|
__version__ = '3'
|
||||||
|
|||||||
Reference in New Issue
Block a user