September 13, 2016
On Tuesday, 13 September 2016 at 12:29:47 UTC, Vadim Lopatin wrote:
> Screenshots on imgur: http://imgur.com/a/eaRiT

btw. please note that on most GNU/Linux terminals you can use simple RGB colors (with each component in [0..5] range). IRL if $TERM != "Linux", it is safe to assume that terminal supports 256 colors (with rare exclustions like "screen" -- those can be safely ignored, screen is fubared anyway ;-).
September 14, 2016
On Tuesday, 13 September 2016 at 13:40:32 UTC, ketmar wrote:
> On Tuesday, 13 September 2016 at 12:29:47 UTC, Vadim Lopatin wrote:
>> Screenshots on imgur: http://imgur.com/a/eaRiT
>
> btw. please note that on most GNU/Linux terminals you can use simple RGB colors (with each component in [0..5] range). IRL if $TERM != "Linux", it is safe to assume that terminal supports 256 colors (with rare exclustions like "screen" -- those can be safely ignored, screen is fubared anyway ;-).

Thank you!
Now dlangui terminal mode supports only 16 colors.
Some refactoring is required to support RGB colors.

September 14, 2016
On Tuesday, 13 September 2016 at 12:50:02 UTC, Rory McGuire wrote:
> Did you get my post about the keyboard thing?
> You can test it by running dub --single filename.d
>
> output looks like:
> kp: [27, 91, 49, 59, 50, 68]
> kp: [27, 91, 49, 59, 53, 68]
> kp: [27, 91, 49, 59, 51, 68]
> kp: [27, 91, 68]
>
> if I press:
> shift+Left
> ctrl+Left
> alt+left
> left

Single modifiers are working ok for me.
But some combinations - do not. E.g. Ctrl+Shift+Left/Up/Down - at least in Gnome terminal.

> BTW: love what you are doing with dlangui. Are you a one person team?

In general, yes. But there were 24 contributors who sent pull requests.
Some of them contributed a lot of PRs - e.g. g4z3r(54 commits), MyLittleRobo(20 commits).

It would be great if more developers joined dlangui. But it should become more usable and popular, to attract more people. One of stopper here is probably poor documentation.

September 14, 2016
On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin wrote:
> Thank you!
> Now dlangui terminal mode supports only 16 colors.
> Some refactoring is required to support RGB colors.

in my editor i'm simply using rgb in [0..255] range, and mapping that to what terminal has. yet it is probably not the best way to make something nice looking when only 16 colors are available. heh, i should try and see how it will look like! ;-)

On Wednesday, 14 September 2016 at 06:06:51 UTC, Vadim Lopatin wrote:

> at least in Gnome terminal.

maybe gnome terminal took those keys for it's own needs -- like tab switching or something. in xterm, those are usual CSI-with-modifier codes: \e[1;<mod><char>, where <mod> is 6 for ctrl+shift, and <char> is A/B/C/D for Up/Down/Right/Left respectively.

it is better to check everything in xterm -- this is still the most used terminal emulator out there. just switch it to send <esc> for alt-key instead of setting high bit. ;-)
September 14, 2016
On Wednesday, 14 September 2016 at 13:04:40 UTC, ketmar wrote:
> On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin CSI-with-modifier codes: \e[1;<mod><char>
this is common format for keys with modifiers, actually. let me quote my rawtty2:

  bool xtermMods (uint mci) @nogc {
    switch (mci) {
      case 2: key.shift = true; return true;
      case 3: key.alt = true; return true;
      case 4: key.alt = true; key.shift = true; return true;
      case 5: key.ctrl = true; return true;
      case 6: key.ctrl = true; key.shift = true; return true;
      case 7: key.alt = true; key.ctrl = true; return true;
      case 8: key.alt = true; key.ctrl = true; key.shift = true; return true;
      default:
    }
    return false;
  }

  void xtermSpecial (char ch) @nogc {
    switch (ch) {
      case 'A': key.key = TtyKey.Key.Up; break;
      case 'B': key.key = TtyKey.Key.Down; break;
      case 'C': key.key = TtyKey.Key.Right; break;
      case 'D': key.key = TtyKey.Key.Left; break;
      case 'E': key.key = TtyKey.Key.Pad5; break;
      case 'H': key.key = TtyKey.Key.Home; break;
      case 'F': key.key = TtyKey.Key.End; break;
      case 'P': key.key = TtyKey.Key.F1; break;
      case 'Q': key.key = TtyKey.Key.F2; break;
      case 'R': key.key = TtyKey.Key.F3; break;
      case 'S': key.key = TtyKey.Key.F4; break;
      case 'Z': key.key = TtyKey.Key.Tab; key.ch = 9; if (!key.shift && !key.alt && !key.ctrl) key.shift = true; break;
      default: badCSI(); break;
    }
  }
September 14, 2016
On Wed, Sep 14, 2016 at 3:04 PM, ketmar via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote:

> On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin wrote:
>
>> Thank you!
>> Now dlangui terminal mode supports only 16 colors.
>> Some refactoring is required to support RGB colors.
>>
>
> in my editor i'm simply using rgb in [0..255] range, and mapping that to what terminal has. yet it is probably not the best way to make something nice looking when only 16 colors are available. heh, i should try and see how it will look like! ;-)
>

Screenshots here are what can be done with terminal/ascii: http://caca.zoy.org/wiki/libcaca


September 14, 2016
p.p.s. yep, VT-100 had only 4 functional keys, so we still enjoying having 'em encoded separately from the others.
September 14, 2016
On Wednesday, 14 September 2016 at 13:08:18 UTC, Rory McGuire wrote:
> Screenshots here are what can be done with terminal/ascii: http://caca.zoy.org/wiki/libcaca

still, you can't use shading charaters to color text, so 16 colors for text output won't look that impressive. ;-)
September 14, 2016
On Wed, Sep 14, 2016 at 3:11 PM, ketmar via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote:

> On Wednesday, 14 September 2016 at 13:08:18 UTC, Rory McGuire wrote:
>
>> Screenshots here are what can be done with terminal/ascii: http://caca.zoy.org/wiki/libcaca
>>
>
> still, you can't use shading charaters to color text, so 16 colors for text output won't look that impressive. ;-)
>

:) true


September 14, 2016
On Wednesday, 14 September 2016 at 13:04:40 UTC, ketmar wrote:
> in my editor i'm simply using rgb in [0..255] range, and mapping that to what terminal has. yet it is probably not the best way to make something nice looking when only 16 colors are available. heh, i should try and see how it will look like! ;-)

actually, it's not that bad, i expected much worser results.

original 256 color mode: http://ketmar.no-ip.org/img/tui/tui_c256.png
and this is restricted to basic 16 colors: http://ketmar.no-ip.org/img/tui/tui_c16a.png
still readable. my terminal has somewhat non-standard first 16 colors (some colors are brighter than default xterm, some are not), that's probably why background becomes so bright. but it is still readable.

and this is 16 colors with "weighted translation" (0.30*r+0.59*g+0.11*b). looks surprisingly clean: http://ketmar.no-ip.org/img/tui/tui_c16b.png
1 2 3
Next ›   Last »