Skip to content

Lightweight terminal #23

cbou opened this Issue May 4, 2012 · 10 comments

9 participants

cbou commented May 4, 2012

It would be nice to have an example without all the Windows and Tab stuff.

Just one terminal which fit his html container.

It would be easier to embed tty.js in a Web-App.

index.html is a nice presentation but it's a too complicated example.

Do you have some examples in this way ?

fbstj commented May 4, 2012

that would be awesome, +1

chjj commented May 4, 2012

Good idea. I have some simple tests that benchmark the terminal inside the browser. That's pretty much all it is, just a single terminal on a single page. I've really been meaning to add it to the repo for a while.

I've also been thinking of moving static/term.js to a separate repo, but at the same time, it is the heart and soul of tty.js, so it should probably stay.

cbou commented May 5, 2012

I also think that client side and server side are too closed to separate them. I would be nice if you can push this small test.

treeform commented Jul 4, 2012

I second this request, it would be nice to have a simple single terminal per chrome window.

jem commented Aug 29, 2012

totally agree that this would be great +1.

aeosynth commented Oct 9, 2012


risacher commented Nov 1, 2012

I've been wanting this also - preferrably size-aware, so that it sizes the terminal to frame size... i.e. something like:

window.onresize = function ()  {                                                                                                                                     
    /* resize terminal code here */                                                                                                                                                  

function windowSize() {                                                                                                                                             
  if( typeof( window.innerWidth ) == 'number' ) {                                                                                                                   
    myWidth = window.innerWidth;                                                                                                                                    
    myHeight = window.innerHeight;                                                                                                                                  
  } else if( document.documentElement && (                                                                                                                          
  document.documentElement.clientWidth ||                                                                                                                           
  document.documentElement.clientHeight ) ) {                                                                                                                       
    //IE 6+ in 'standards compliant mode'                                                                                                                           
    myWidth = document.documentElement.clientWidth;                                                                                                                 
    myHeight = document.documentElement.clientHeight;                                                                                                               
  } else if( document.body && ( document.body.clientWidth ||                                                                                                        
  document.body.clientHeight ) ) {                                                                                                                                  
    //IE 4 compatible                                                                                                                                               
    myWidth = document.body.clientWidth;                                                                                                                            
    myHeight = document.body.clientHeight;                                                                                                                          
chjj commented Nov 1, 2012

@risacher, yeah, that's not a bad idea either. Maybe we could just make it full screen anyway.

Kind of a late announcement, but to everyone else who posted in this thread, there is an example available of a simple terminal:

nmg1986 commented Oct 29, 2014

I want this also +1


👍 Would be great to just open a page in a browser and start cracking away.

On a side note... It would also be nice to be able to place buttons below the window which act as "Macros"... Say a "build" button that just drops a command into the tty and runs it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.