main: work in progress [might break]

This commit is contained in:
Leon van Kammen 2024-09-13 18:55:12 +02:00
parent 52f7766bca
commit a3a9fae294
7 changed files with 25 additions and 11 deletions

View File

@ -11,7 +11,7 @@ source /etc/profile.xrsh
source /etc/profile.sh source /etc/profile.sh
# source js functions # source js functions
./.profile.js | grep -v undefined test -f /etc/profile.js && chmod +x /etc/profile.js && /etc/profile.js | grep -v undefined
## forward not-found commands to javascript (via jsh) ## forward not-found commands to javascript (via jsh)
command_not_found_handle(){ command_not_found_handle(){
@ -34,18 +34,26 @@ help(){
echo 'include file into page' "type 'require <url.js|css>'" echo 'include file into page' "type 'require <url.js|css>'"
echo 'create AFRAME a-entity' "type 'a_entity <componentname> [...]" echo 'create AFRAME a-entity' "type 'a_entity <componentname> [...]"
echo '' echo ''
echo 'type "man -l /root/manual.md" to read the full manual"' echo 'type "man xrsh" to read the full manual'
ONBOARDING=1 ONBOARDING=1
} }
export TERM=xterm-256color export TERM=xterm-256color
export PS1="\n\[\033[38;5;57m\]x\[\033[38;5;93m\]r\[\033[38;5;129m\]s\[\033[38;5;165m\]h \[\033[38;5;201m\]# \[\033[0m\]" export PS1="\[\033[38;5;165m\]> \[\033[0m\]"
# interactive login # interactive login
[[ -t 0 ]] && { [[ -t 0 ]] && {
cat /etc/motd
test -n "$STY" || { test -n "$STY" || {
screen -R -T screen-256color -c /root/.screenrc resize # call twice
resize # otherwise COLUMNS/ROWS is 0
# add URL-hash as extra screen session
test -z "$HASH" || {
grep 'screen -t #' /root/.screenrc || {
echo "screen -t xrsh+URL 2 /bin/sh -c '${HASH}; sh'" | sed "s/'#/'/g" >> /root/.screenrc
} }
}
screen -Aa -R -T screen-256color -c /root/.screenrc
}
test -n "$STY" && cat /etc/motd
} }

View File

@ -46,6 +46,12 @@ require(){
})()' })()'
} }
man(){
test "$1" = xrsh && {
cat /root/manual.md | less
}
}
a_entity(){ a_entity(){
code="let el = document.createElement('a-entity')" code="let el = document.createElement('a-entity')"
for i in "$@"; do for i in "$@"; do

View File

@ -18,7 +18,8 @@ test -d /dev/browser || {
echo 1 > /mnt/console.tty echo 1 > /mnt/console.tty
ln -s /mnt/console.tty /dev/browser/tty ln -s /mnt/console.tty /dev/browser/tty
ln -fs /mnt/js /dev/browser/js ln -fs /mnt/js /dev/browser/js
touch /dev/browser/console ln -fs /mnt/console /dev/browser/console
touch /mnt/console
touch /dev/browser/index.html touch /dev/browser/index.html
} }

View File

@ -34,8 +34,4 @@ defbce on # use current bg color for erased chars
# setup windows # setup windows
screen -t jsconsole 0 tail -f /dev/browser/console screen -t jsconsole 0 tail -f /dev/browser/console
screen -t jsh 1 jsh screen -t xrsh 1
screen -t xrsh 2
##If you want it to start with a particular window active, you can add a line like the following:
#select 1

View File

@ -0,0 +1,2 @@
#!/bin/sh

View File

@ -14,6 +14,7 @@ BR2_PACKAGE_ZIP=y
BR2_PACKAGE_LUA=y BR2_PACKAGE_LUA=y
BR2_PACKAGE_MICROPYTHON=y BR2_PACKAGE_MICROPYTHON=y
BR2_PACKAGE_SCREEN=y BR2_PACKAGE_SCREEN=y
BR2_PACKAGE_MG=y
BR2_PACKAGE_NANO=y BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_INITRAMFS=y BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_ROOTFS_ISO9660=y BR2_TARGET_ROOTFS_ISO9660=y

BIN
dist/v86-linux.iso vendored

Binary file not shown.