~balejk

Recent activity

Re: [PATCH vaxis v2 1/2] term: remove unused property 3 days ago

From Karel Balej to ~rockorager/vaxis

Tim Culverhouse, 2024-05-15T15:41:54-05:00:
> On Tue May 14, 2024 at 3:21 PM CDT, Karel Balej wrote:
> > term.Model.window isn't used anywhere in the code: remove it.
> >
> > Signed-off-by: Karel Balej <balejk@matfyz.cz>
> > ---
>
> Thanks for the patches, Karel! Applied.

Great, thank you for all your help along the way!

Will you be making a release soon? It would be really nice if it could
make it into the next aerc release.

[PATCH vaxis v2 2/2] term: support OSC 11 queries 4 days ago

From Karel Balej to ~rockorager/vaxis

Add support for the OSC 11 control sequence queries to the embedded
terminal. Programs can use this to query the current background color.

This is implemented by introducing a new Vaxis method which queries the
host terminal. The built-in terminal uses this method to obtain the
background color on the fly and reports it back to the program.

This feature was motivated by aerc which uses the terminal to run editor
when composing messages. The editor, such as neovim, will now be able to
query the background color and adapt its colorscheme accordingly.

Implements: https://todo.sr.ht/~rockorager/vaxis/15
Signed-off-by: Karel Balej <balejk@matfyz.cz>
---
[message trimmed]

[PATCH vaxis v2 1/2] term: remove unused property 4 days ago

From Karel Balej to ~rockorager/vaxis

term.Model.window isn't used anywhere in the code: remove it.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
---
 widgets/term/term.go | 2 --
 1 file changed, 2 deletions(-)

diff --git a/widgets/term/term.go b/widgets/term/term.go
index c93a959973b8..26027ededd76 100644
--- a/widgets/term/term.go
+++ b/widgets/term/term.go
@@ -52,8 +52,6 @@ type Model struct {
	primaryState cursorState
	altState     cursorState
[message trimmed]

Re: [RFC PATCH 2/2] term: support OSC 11 4 days ago

From Karel Balej to ~rockorager/vaxis

Tim Culverhouse, 2024-05-14T09:13:50-05:00:
> On Tue May 14, 2024 at 9:09 AM CDT, Karel Balej wrote:
> > > This doesn't need to be a pointer, it can just be `rgb` and a return type of
> > > [3]int.
> >
> > What shall I then return if the terminal does not support the sequence?
> > {-1, -1, -1}? And the caller should assume that if any of the three is
> > -1, then the terminal does not support it and there is no need to check
> > the others? The pointer approach seems more straightforward to me and
> > I'm also not sure if the negative numbers might have some meaning for
> > RGB.
>
> Oh good point. Let's return a vaxis.Color. If the background color is not
> reported, we can return Color(0) which is "default". Just make a comment that if

Re: [RFC PATCH 2/2] term: support OSC 11 4 days ago

From Karel Balej to ~rockorager/vaxis

Tim Culverhouse, 2024-05-14T09:41:02-04:00:
> On Fri, 10 May 2024 09:06:43 CDT, Karel Balej wrote:
[...]
> > diff --git a/vaxis.go b/vaxis.go
> > index a85a832eff8c..ce1f52e720b8 100644
> > --- a/vaxis.go
> > +++ b/vaxis.go
> > @@ -942,6 +960,21 @@ func (vx *Vaxis) handleSequence(seq ansi.Sequence) {
> >  	}
> >  }
> >  
> > +// QueryBackground queries the host terminal for background colour and returns
> > +// it as a pointer to an array of three integers (RGB). If the host terminal
> > +// doesn't support this, nil is returned instead. Make sure not to run this in

Re: [PATCH aerc] app: propagate bell from the built-in terminal 4 days ago

From Karel Balej to ~rjarry/aerc-devel

Robin Jarry, 2024-05-13T22:18:00+02:00:
> Karel Balej, May 09, 2024 at 16:50:
> > Make aerc ring the terminal bell if a program running in it's built-in
> > terminal attempts to do the same.
> >
> > Changelog-added: Propagate terminal bell from the built-in terminal.
> > Signed-off-by: Karel Balej <balejk@matfyz.cz>
> > ---
> > Note that this will not work until the first patch of
> > https://lists.sr.ht/~rjarry/aerc-devel/patches/51664 is applied.
> >
> >  app/terminal.go | 2 ++
> >  1 file changed, 2 insertions(+)
> >

[RFC PATCH 2/2] term: support OSC 11 8 days ago

From Karel Balej to ~rockorager/vaxis

Add support for the OSC 11 control sequence which programs can use to
query the current background colour to the embedded terminal.

This is implemented by the terminal relaying the query to the host
terminal, although since the method handling this is now added to Vaxis'
public API, it returns the RGB colour in a more useful parsed form,
rather than literally relaying the raw request and response.

This feature was motivated by aerc which uses the terminal to run editor
when composing messages. The editor, such as neovim, will now be able to
query the background colour and adapt its colourscheme accordingly.

Implements: https://todo.sr.ht/~rockorager/vaxis/15
Signed-off-by: Karel Balej <balejk@matfyz.cz>
[message trimmed]

[RFC PATCH 1/2] term: remove unused property 8 days ago

From Karel Balej to ~rockorager/vaxis

term.Model.window isn't used anywhere in the code: remove it.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
---
 widgets/term/term.go | 2 --
 1 file changed, 2 deletions(-)

diff --git a/widgets/term/term.go b/widgets/term/term.go
index c93a959973b8..26027ededd76 100644
--- a/widgets/term/term.go
+++ b/widgets/term/term.go
@@ -52,8 +52,6 @@ type Model struct {
	primaryState cursorState
	altState     cursorState
[message trimmed]

[RFC PATCH 0/2] support for OSC 11 8 days ago

From Karel Balej to ~rockorager/vaxis

Hello, Tim (and possibly others),

here is my first attempt at exposing the real background colour to
applications running in the embedded terminal.

I have tested this with aerc in several ways. I have run aerc built with
Vaxis patched with this with both dark and light background set in the
terminal and the embedded editor (neovim) has adapted its colourscheme
correctly.

To test this on a host terminal which doesn't support OSC 11, I have ran
the patched aerc inside embedded terminal of aerc 0.17.0 as packaged in
my distribution.

[PATCH vaxis] vaxis: fix openTty docstring 9 days ago

From Karel Balej to ~rockorager/vaxis

Signed-off-by: Karel Balej <balejk@matfyz.cz>
---
 vaxis.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vaxis.go b/vaxis.go
index 211a49d483c0..a85a832eff8c 100644
--- a/vaxis.go
+++ b/vaxis.go
@@ -1083,7 +1083,7 @@ func (vx *Vaxis) Suspend() error {
	return nil
}

// makeRaw opens the /dev/tty device, makes it raw, and starts an input parser
[message trimmed]