made hooks aliases to ~/bin
This commit is contained in:
parent
919a888386
commit
9af957b6d5
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
test -n "$1" || { echo "usage: a-gltf-model <gltf-file>"; exit; }
|
||||||
|
|
||||||
|
file="${1#/}" # strip leading slash if present
|
||||||
|
|
||||||
|
echo "<a-gltf-model src='file://xrsh/$file'></a-gltf-model>" >> /root/index.html
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
test -n "$1" || { echo "usage: a-text <textfile_or_string>"; exit; }
|
||||||
|
|
||||||
|
str="$1"
|
||||||
|
test -f "$str" && str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks
|
||||||
|
|
||||||
|
echo "<a-text value='${str}' position='-0.4 1.8 -3' grabbable></a-text>" >> /root/index.html
|
|
@ -0,0 +1 @@
|
||||||
|
../../../bin/a-text
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# usage: import-to-aframe <textfile>
|
|
||||||
|
|
||||||
str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks
|
|
||||||
|
|
||||||
echo "<a-text value='${str}' position='-0.4 1.8 -3' grabbable></a-text>" >> /root/index.html
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../../../bin/a-gltf-model
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# usage: import-to-aframe <textfile>
|
|
||||||
|
|
||||||
str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks
|
|
||||||
|
|
||||||
echo "<a-text value='${str}' position='-0.4 1.8 -3' grabbable></a-text>" >> /root/index.html
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
logger "*TODO*: importing to scene"
|
|
|
@ -168,3 +168,16 @@ ctrl a X -> remove active window from split screen
|
||||||
ctrl a O -> logout active window (disable output)
|
ctrl a O -> logout active window (disable output)
|
||||||
ctrl a I -> login active window (enable output)
|
ctrl a I -> login active window (enable output)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## webrequests to the filesystem
|
||||||
|
|
||||||
|
Javascript webrequests can read from the filesystem via the 'file://host/path' protocol:
|
||||||
|
|
||||||
|
```
|
||||||
|
fetch("file://xrsh/mnt/profile.browser")
|
||||||
|
```
|
||||||
|
|
||||||
|
current [security] limitations:
|
||||||
|
|
||||||
|
* only /mnt directory is exposed
|
||||||
|
* file needs to be world-readable (`chmod +r /mnt/<file>`)
|
||||||
|
|
Loading…
Reference in New Issue