added launcher files to ~/.config/launcher

This commit is contained in:
Leon van Kammen 2025-03-14 15:31:48 +01:00
parent bb8fd366dd
commit 301c282125
5 changed files with 38 additions and 23 deletions
buildroot-v86/board/v86/rootfs_overlay/root
.config/launcher
.profile
opt/codemirror
dist

View File

@ -0,0 +1,2 @@
#!/bin/sh
cm /root/manual.md

View File

@ -0,0 +1,2 @@
#!/bin/sh
a-gltf-model https://coderofsalvation.github.io/xrsh-media/assets/background.glb

View File

@ -27,19 +27,37 @@ cd(){
}
}
# get latest xrfragments to support interactive models
require https://xrfragment.org/dist/xrfragment.aframe.js
test -f /root/.boot || {
touch /root/.boot # make sure we run below once
# start index.js if /dev/browser/js filesize is not great than 0
if [ ! -s /dev/browser/js ]; then
chmod +x /mnt/root/index.js && /mnt/root/index.js | grep -v undefined
fi
# start index.html if /dev/browser/html filesize is not great than 0
if [ ! -s /dev/browser/html ]; then
chmod +x /mnt/root/index.html && /mnt/root/index.html
fi
# uncomment to set location (3D scene file [with XR Fragments] )
#require https://xrfragment.org/index.glb
#require https://coderofsalvation.github.io/xrsh-media/assets/background.glb
# add menu items
find /root/.config/launcher -type f | while read item; do
js '
let term = document.querySelector("[isoterminal]").components.isoterminal.term
launcher.register({
name: "'$(basename $item)'",
cb: () => term.exec("'$item'")
})
return "'$item'"
'
done > /tmp/log
# get latest xrfragments to support interactive models
require https://xrfragment.org/dist/xrfragment.aframe.js
# start index.js if /dev/browser/js filesize is not great than 0
if [ ! -s /dev/browser/js ]; then
chmod +x /mnt/root/index.js && /mnt/root/index.js | grep -v undefined
fi
# start index.html if /dev/browser/html filesize is not great than 0
if [ ! -s /dev/browser/html ]; then
chmod +x /mnt/root/index.html && /mnt/root/index.html
fi
# uncomment to set location (3D scene file [with XR Fragments] )
#require https://xrfragment.org/index.glb
#require https://coderofsalvation.github.io/xrsh-media/assets/background.glb
#
}

View File

@ -195,14 +195,7 @@ AFRAME.registerComponent('codemirror', {
"form_factor": "narrow"
}
],
"help":`
Helloworld application
This is a help file which describes the application.
It will be rendered thru troika text, and will contain
headers based on non-punctualized lines separated by linebreaks,
in above's case "\nHelloworld application\n" will qualify as header.
`
"help": "Codemirror is a popular editor https://codemirror.net/5/doc/manual.html"
}
});

BIN
dist/v86-linux.iso vendored

Binary file not shown.