aboutsummaryrefslogtreecommitdiffstats
path: root/web/demo/overlay/root
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-19 20:11:10 +0200
committeruser <user@clank>2026-08-19 20:11:10 +0200
commit76f3868cd7b775cb59b85a32c2b223732f6afc30 (patch)
treee38858cabf624732ca48ae7a8b4c49e9af65728c /web/demo/overlay/root
parentslosh: layout files are *.layout, not *.layout.kdl (diff)
downloadslosh-76f3868cd7b775cb59b85a32c2b223732f6afc30.tar.gz
slosh-76f3868cd7b775cb59b85a32c2b223732f6afc30.tar.xz
slosh-76f3868cd7b775cb59b85a32c2b223732f6afc30.zip
slosh: the website lives in web/ -- one directory, one build, make www
Consolidate everything the website is made of: - web_new/ -> web/: the front page, install.sh, and build-site - contrib/webdemo/ -> web/demo/: the in-browser machine, committed for the first time (it had never been checked in) - make www at the top level assembles the whole site into build/www (NO_DEMO=1 skips the guest cross-compile) - web_plan.md deleted: the plan is fulfilled and web/README.md is now the record Path fallout: the overlay theme symlink gains one ../ (web/demo is a level shallower relative to contrib/themes), PYSRC in the Makefile follows the demo scripts, contrib/README.md drops its webdemo section. ROOT := ../.. in the demo Makefile survives unchanged -- web/demo sits at the same depth contrib/webdemo did. Verified: make www builds front page + docs + demo end to end, web/demo make check boots the image to slosh, tests/test_docs.py and make fmt-check green.
Diffstat (limited to 'web/demo/overlay/root')
-rw-r--r--web/demo/overlay/root/.config/slosh/config.kdl29
l---------web/demo/overlay/root/.config/slosh/themes/sl0p.kdl1
-rw-r--r--web/demo/overlay/root/.vimrc23
-rw-r--r--web/demo/overlay/root/demo.layout27
4 files changed, 80 insertions, 0 deletions
diff --git a/web/demo/overlay/root/.config/slosh/config.kdl b/web/demo/overlay/root/.config/slosh/config.kdl
new file mode 100644
index 0000000..3252da7
--- /dev/null
+++ b/web/demo/overlay/root/.config/slosh/config.kdl
@@ -0,0 +1,29 @@
+// The demo's config. Deliberately about twenty lines: the reference config with
+// every setting and the reasoning attached is config/config.kdl in the source
+// tree, and 48KB of commentary is the wrong thing to ship to a browser.
+//
+// Saving a config applies to a running session, so this file is also a thing to
+// edit from inside the demo: `C-a e` opens it in a pane.
+
+// The default palette, from the file the repo ships rather than a second copy
+// of it -- overlay/root/.config/slosh/themes/sl0p.kdl is a symlink to
+// contrib/themes/sl0p.kdl, so this is the same sl0p as everywhere else and it
+// cannot fall behind. An include is resolved against *this* file's directory.
+include "themes/sl0p.kdl"
+
+// Busybox ash is the only shell on this machine and $SHELL is not set on it.
+shell "/bin/sh"
+
+// A tenth of the default history. The whole machine is 32MB of disk and
+// whatever RAM the page asked for, and nothing here will produce 1000 lines.
+scrollback 1000
+
+// Enough gap to see the frames, without spending a column this terminal does
+// not have. `gap` is in rows and comes out square (gap_aspect).
+gap 1
+padding 0 1
+
+// No shader by default: a cursor-line wash reads as a rendering artifact to
+// anyone who did not ask for it. The shader system is one paste away --
+// contrib/shaders/ has thirty-two of them, and `C-a e` opens this file in a
+// pane; it is re-read the moment you save.
diff --git a/web/demo/overlay/root/.config/slosh/themes/sl0p.kdl b/web/demo/overlay/root/.config/slosh/themes/sl0p.kdl
new file mode 120000
index 0000000..9306464
--- /dev/null
+++ b/web/demo/overlay/root/.config/slosh/themes/sl0p.kdl
@@ -0,0 +1 @@
+../../../../../../../contrib/themes/sl0p.kdl \ No newline at end of file
diff --git a/web/demo/overlay/root/.vimrc b/web/demo/overlay/root/.vimrc
new file mode 100644
index 0000000..6974506
--- /dev/null
+++ b/web/demo/overlay/root/.vimrc
@@ -0,0 +1,23 @@
+" The demo's vim: syntax highlighting on a pruned runtime -- syntax/,
+" filetype detection, colours, and nothing else. :help is not installed.
+set nocompatible
+filetype on
+syntax on
+
+" slosh's terminal does 24-bit colour (it is most of what the shaders are),
+" and the pane's TERM is an alias of xterm-256color, whose terminfo does not
+" say so. COLORTERM comes from /etc/profile; the t_8f/t_8b overrides are the
+" standard incantation for truecolor on a TERM that is not *-direct.
+if $COLORTERM ==# 'truecolor'
+ let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
+ let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
+ set termguicolors
+endif
+colorscheme habamax
+
+" A pane in an emulated machine: keep vim from wanting things that are not
+" there. No swapfile chatter on a throwaway disk, no mouse fights with the
+" multiplexer's own mouse handling.
+set noswapfile
+set mouse=
+set laststatus=1
diff --git a/web/demo/overlay/root/demo.layout b/web/demo/overlay/root/demo.layout
new file mode 100644
index 0000000..a5b6bd2
--- /dev/null
+++ b/web/demo/overlay/root/demo.layout
@@ -0,0 +1,27 @@
+// What the visitor lands in: one tab, three panes, one screen.
+//
+// slosh --layout /root/demo.layout
+//
+// which is the line /etc/inittab respawns. No `cwd=` anywhere in it: a relative
+// path in a layout file means the directory the file is in, and a pane with no
+// cwd at all starts there too -- so every pane here starts in /root.
+layout {
+ tab name="demo" purpose="demo" {
+
+ // The greeting, and a shell under it. This pane was *given* a command,
+ // so typing `exit` leaves the corpse and an offer to re-run it (`C-a r`)
+ // rather than closing the pane -- which is a pane state worth seeing.
+ pane focus=true purpose="demo:welcome" command="cat /etc/motd; exec /bin/sh"
+
+ pane split="rows" {
+
+ // Laid out, running nothing, started by your first keystroke: the
+ // pane shows what it *would* run. Here it is also the proof that
+ // the machine underneath is a real riscv64 one.
+ pane purpose="demo:machine" command="cat /proc/cpuinfo" suspended=true
+
+ // No command: the session's shell, in /root.
+ pane purpose="demo:shell"
+ }
+ }
+}