aboutsummaryrefslogtreecommitdiff
path: root/remotedraw
diff options
context:
space:
mode:
authorJosh Ott <josh@ottmail.me>2025-09-07 20:39:37 -0400
committerJosh Ott <josh@ottmail.me>2025-09-07 20:39:37 -0400
commit4012ed8bc21b54b4a0898e2dfc7ff047582f9a62 (patch)
tree07cf428bcde50439a33b62c1107aee2f4b870f07 /remotedraw
parent5f61cd3fcc069012becc486b9687d105e7295ef6 (diff)
downloadbin-4012ed8bc21b54b4a0898e2dfc7ff047582f9a62.tar.gz
bin-4012ed8bc21b54b4a0898e2dfc7ff047582f9a62.zip
remotedraw
Diffstat (limited to 'remotedraw')
-rwxr-xr-xremotedraw19
1 files changed, 19 insertions, 0 deletions
diff --git a/remotedraw b/remotedraw
new file mode 100755
index 0000000..bb1af96
--- /dev/null
+++ b/remotedraw
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# send a xournalpp document to my tablet/laptop (lena) for editing
+
+tablet=lena
+mountpoint="$(ssh $tablet "echo \$HOME/.local/share/remotedraw")"
+hostname="$(cat /etc/hostname)"
+
+echo $mountpoint
+
+target="$(realpath $1)"
+parentdir="$(dirname $target)"
+filename="$(basename $target)"
+
+echo "sshfs $hostname:$parentdir $mountpoint"
+
+ssh $tablet "sshfs $hostname:$parentdir $mountpoint"
+ssh $tablet "DISPLAY=:0 xournalpp $mountpoint/$filename"
+ssh $tablet "umount $mountpoint"