Browse Source

add photo, ssh connection message

master
evan 6 years ago
parent
commit
b071b9af85
  1. 3
      .gitignore
  2. 8
      README.md
  3. BIN
      photo.jpg
  4. 41
      remarkable_mouse/remarkable_mouse.py
  5. 2
      remarkable_mouse/version.py

3
.gitignore vendored

@ -1,4 +1,5 @@
**/*.pyc **/*.pyc
dist/ dist/
remarkable_mouse.egg-info remarkable_mouse.egg-info
**/__pycache__ **/__pycache__
build/

8
README.md

@ -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.
![demo](photo.jpg | width=600)
# 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

BIN
photo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

41
remarkable_mouse/remarkable_mouse.py

@ -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")
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right'])
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use")
parser.add_argument('--offset', default=(0, 0), type=int, metavar=('x', 'y'), nargs=2, help="offset mapped region on monitor")
parser.add_argument('--debug', action='store_true', default=False, help="enable debug messages")
parser.add_argument('--key', type=str, metavar='PATH', help="ssh private key")
parser.add_argument('--password', default=None, type=str, help="ssh password")
parser.add_argument('--address', default='10.11.99.1', type=str, help="device address")
args = parser.parse_args()
if args.debug:
print('Debugging enabled...')
logging.getLogger('').setLevel(logging.DEBUG)
log.setLevel(logging.DEBUG)
read_tablet(args)
if __name__ == '__main__':
try: try:
main() parser = argparse.ArgumentParser(description="use reMarkable tablet as a mouse input")
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right'])
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use")
parser.add_argument('--offset', default=(0, 0), type=int, metavar=('x', 'y'), nargs=2, help="offset mapped region on monitor")
parser.add_argument('--debug', action='store_true', default=False, help="enable debug messages")
parser.add_argument('--key', type=str, metavar='PATH', help="ssh private key")
parser.add_argument('--password', default=None, type=str, help="ssh password")
parser.add_argument('--address', default='10.11.99.1', type=str, help="device address")
args = parser.parse_args()
if args.debug:
print('Debugging enabled...')
logging.getLogger('').setLevel(logging.DEBUG)
log.setLevel(logging.DEBUG)
read_tablet(args)
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass
if __name__ == '__main__':
main()

2
remarkable_mouse/version.py

@ -1 +1 @@
__version__ = '1' __version__ = '3'

Loading…
Cancel
Save