Skip to content

Commit

Permalink
Merge pull request isaacwisdom#27 from isaacwisdom/v1-oneliner-install
Browse files Browse the repository at this point in the history
V1 one liner install scripts!
  • Loading branch information
isaacwisdom authored Aug 8, 2022
2 parents 3108d6d + c220c82 commit 39f99a9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 27 deletions.
32 changes: 5 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,19 @@ Also confirmed to work with these other styli:

The tool will definitely break when the reMarkable updates. When that happens, just reinstall!
# Install Instructions
SSH into your reMarkable and make a directory to store our files:
```Shell
cd
mkdir RemarkableLamyEraser
```shell
cd; wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/v1/install.sh; chmod +x install.sh; ./install.sh
```
Download the binary from the release page, and the .service file from the project page:
```Shell
cd ~/RemarkableLamyEraser
wget https://github.com/isaacwisdom/RemarkableLamyEraser/releases/latest/download/RemarkableLamyEraser
wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/v1/RemarkableLamyEraser/LamyEraser.service
```
Make the binary exectuable, copy the .service file to systemd file, enable, and start it. This means the tool will automatically start on boot:
```Shell
chmod +x RemarkableLamyEraser
cp LamyEraser.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable LamyEraser.service
systemctl start LamyEraser.service
```

# Uninstall Instrucions
```Shell
systemctl stop LamyEraser.service
systemctl disable LamyEraser.service
rm -rf ~/RemarkableLamyEraser
rm /lib/systemd/system/LamyEraser.service
systemctl daemon-reload
systemctl reset-failed
```shell
cd; wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/v1/uninstall.sh; chmod +x uninstall.sh; ./uninstall.sh
```


# Usage
Press and hold to erase, release to use as a normal pen. Double click the button to undo. Note that at the moment, double pressing to undo only works for portrait orientation documents.

Further customization can be done by adding arguments to ExecStart line of the LamyEraser.service file. This can be opened with `nano ~/RemarkableLamyEraser/LamyEraser.service`.
Further customization can be done by adding arguments to ExecStart line of the LamyEraser.service file. This can be opened with `nano /lib/systemd/system/LamyEraser.service`.
The supported arguments are:
`--press` Press and hold to erase, release to use as a normal pen. *This is the default behavior.*
`--toggle` Press the button to erase, press the button again to swtich back to a normal pen.
Expand Down
40 changes: 40 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

clear
cd ~

systemctl stop LamyEraser.service 2&> /dev/null
systemctl disable LamyEraser.service 2&> /dev/null

echo "Downloading RemarkableLamyEraser Executable to /usr/sbin..."
cd /usr/sbin
rm -f RemarkableLamyEraser
wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/v1/RemarkableLamyEraser/RemarkableLamyEraser
echo "Adding execute privleges..."
chmod +x RemarkableLamyEraser
cd ~


read -p "Would you like RemarkableLamyEraser to start automatically on boot? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Downloading service file to /lib/systemd/system..."
cd /lib/systemd/system/
rm -f LamyEraser.service
wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/v1/RemarkableLamyEraser/LamyEraser.service
read -p "Would you like to edit your configuration now? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
nano LamyEraser.service
fi
echo "Setting up RemarkableLamyEraser to start on boot..."
systemctl daemon-reload
systemctl enable LamyEraser.service
echo "Starting RemarkableLamyEraser. Enjoy!"
systemctl start LamyEraser.service
else
echo "You can start RemarkableLamyEraser at any time by running RemarkableLamyEraser"
echo "Enjoy!"
fi
9 changes: 9 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
systemctl stop LamyEraser.service
systemctl disable LamyEraser.service
echo "Deleting RemarkableLamyEraser executable"
rm -f /usr/sbin/RemarkableLamyEraser
echo "Deleting service file..."
rm -f /lib/systemd/system/LamyEraser.service
systemctl daemon-reload
systemctl reset-failed
echo "RemarkableLamyEraser uninstalled."

0 comments on commit 39f99a9

Please sign in to comment.