IonicaBizau / web-term

:tv: A fullscreen terminal in your browser.
MIT License
168 stars 21 forks source link

Configurations #34

Closed IonicaBizau closed 8 years ago

IonicaBizau commented 8 years ago

Would be nice to be able to save some configuration things:

I am thinking to do that in the ~/.web-term.json file and maybe later to have a visual way to edit that.

micimize commented 8 years ago

we could make the entire 256 color palette configurable via stylesheet, with .bg-*** and .fg-*** classes, and just add .underline, .bold, etc

micimize commented 8 years ago

if you pass Terminal an array of 10 or 18 colors, it'll set foreground and background based on that:

            var tab = term.tab = Terminal.call(term, {
                cols: win.cols,
                rows: win.rows,
                colors: [ // from ethanschoonover.com/solarized
                    '#073642', //$base02 
                    '#dc322f', //$red
                    '#859900', //$green
                    '#b58900', //$yellow
                    '#268bd2', //$blue
                    '#d33682', //$magenta
                    '#2aa198', //$cyan
                    '#eee8d5', //$base2

                    '#002b36', //$base03
                    '#cb4b16', //$orange
                    '#586e75', //$base01
                    '#657b83', //$base00
                    '#93a1a1', //$base1
                    '#6c71c4', //$violet
                    '#839496', //$base0
                    '#fdf6e3', //$base3
                    '#002b36',  //$base03 and background
                    '#839496' //$base0 and foreground
                ]
IonicaBizau commented 8 years ago

@michaeljosephrosenthal Ohhh, that's really, really, really nice! :smile: Thanks for pointing that out. That means we could support color themes (maybe even supporting xml formats that existing terminals use) for web-term.

Again, thanks for that! First I was thinking to hack it only on the client side (with some CSS), but this is much better the good way. :+1:

micimize commented 8 years ago

yeah, that was part of the original tty.js options. My current colors are

colors: [
    '#073642', //$base02
    '#dc322f', //$red
    '#859900', //$green
    '#b58900', //$yellow
    '#268bd2', //$blue
    '#d33682', //$magenta
    '#2aa198', //$cyan
    '#eee8d5', //$base2

    '#002b36', //$base03
    '#cb4b16', //$orange
    '#586e75', //$base01
    '#657b83', //$base00
    '#93a1a1', //$base1
    '#6c71c4', //$violet
    '#839496', //$base0
    '#fdf6e3', //$base3 

    '#002b36', '#839496'
]

I also commented out

  // See: XTerm*boldColors
  //if (fg < 8) fg += 8;

in the bolding code, which was making bolds into :sparkles: brights :sparkles: as a compatibility thing.

IonicaBizau commented 8 years ago

@michaeljosephrosenthal Played with this in #36. Check it out. :sparkle: