diff --git a/pygbag/aio.py b/pygbag/aio.py index fd8f050..c2e899b 100644 --- a/pygbag/aio.py +++ b/pygbag/aio.py @@ -78,3 +78,4 @@ else: time.sleep(dt) print("sim loop exited") + sys.stdout.flush() diff --git a/pygbag/support/cross/aio/__init__.py b/pygbag/support/cross/aio/__init__.py index 896ecfc..d708ea8 100644 --- a/pygbag/support/cross/aio/__init__.py +++ b/pygbag/support/cross/aio/__init__.py @@ -148,6 +148,7 @@ def overloaded(i, *attrs): leave = enter + spent from asyncio import * +from asyncio import exceptions __run__ = run diff --git a/static/pythons.js b/static/pythons.js index 6cb0051..da1119c 100644 --- a/static/pythons.js +++ b/static/pythons.js @@ -1012,15 +1012,12 @@ async function feat_vtx(debug_hidden) { const { WasmTerminal } = await import("./vtx.js") const lines = get_terminal_lines() // including virtual get_terminal_console() const py = window.document.body.clientHeight - var fntsize = Math.floor(py/lines) - 7 + var fntsize = Math.floor(py/lines) - 2 -// if (lines<45) - // fntsize -= 3 + // why ???????? + if (fntsize>32) fntsize-- + if (fntsize>20) fntsize-- - if (py>720) - fntsize += 1 - if (py>1024) - fntsize += 1 console.warn("fnt:",window.document.body.clientHeight ,"/", lines,"=", fntsize) vm.vt = new WasmTerminal( "terminal", diff --git a/static/vtx.js b/static/vtx.js index 8d89382..9f87d36 100644 --- a/static/vtx.js +++ b/static/vtx.js @@ -48,43 +48,36 @@ export class WasmTerminal { this.inputStartCursor = null this.nodup = 1 - var theme = { background: '#1a1c1f' } + var theme = { + background: '#1a1c1f' + } + + var transparency = false + var sback = 1000 if (is_fbdev) { theme = { foreground: '#ffffff', - background: 'rgba(0, 0, 0, 0)', - cursor: '#ffffff', - selection: 'rgba(255, 255, 255, 0.3)', - black: '#000000', - red: '#e06c75', - brightRed: '#e06c75', - green: '#A4EFA1', - brightGreen: '#A4EFA1', - brightYellow: '#EDDC96', - yellow: '#EDDC96', - magenta: '#e39ef7', - brightMagenta: '#e39ef7', - cyan: '#5fcbd8', - brightBlue: '#5fcbd8', - brightCyan: '#5fcbd8', - blue: '#5fcbd8', - white: '#d0d0d0', - brightBlack: '#808080', - brightWhite: '#ffffff' + background: 'rgba(0, 0, 0, 0)' } + sback = 0 transparency = true } this.xterm = new Terminal( { +// rendererType : "dom", + rendererType : "webgl", + experimentalCharAtlas : "webgl", theme: theme, allowTransparency: transparency, allowProposedApi : true , // xterm 0.5 + sixel - scrollback: 0, + scrollback: sback, + fontFamily: 'Courier-new, courier, monospace', fontSize: (fontsize || 12), - cols: (cols || 132), rows: (rows || 32) + cols: (cols || 132), + rows: (rows || 32) } );