Tim Culverhouse
c99517181e
queue: remove useless defer
2024-02-03 10:05:42 -06:00
Tim Culverhouse
62ee6d1b58
notify, setTitle: flush the buffer
...
Flush the buffer when calling notify and setTitle
2024-02-03 10:02:04 -06:00
Tim Culverhouse
eae1036c29
color: export Color and fix bright indexing
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-02-02 16:22:26 -06:00
Tim Culverhouse
2b8346f691
tty: shadow os.system with our own switch
...
When linking lib_c, os.system gets overwritten with std.c. The linux
implementation of std.c doesn't contain the constants we need.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-02-02 11:14:25 -06:00
Tim Culverhouse
927b4120b5
tests: remove finished TODO
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 20:07:02 -06:00
Tim Culverhouse
a8e77a23ae
keys: finish kitty key definitions
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 20:06:02 -06:00
Tim Culverhouse
3798a8ede3
window: implement wrap and introduce Segment type
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 19:13:56 -06:00
Tim Culverhouse
f3cf7bcfcd
mouse: implement mouse parsing and events
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 12:50:00 -06:00
Tim Culverhouse
ad3ef19b87
mouse: add todo
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 07:31:27 -06:00
Tim Culverhouse
43f73eb895
image: implement deleting images from memory
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 07:18:16 -06:00
Tim Culverhouse
8c8c592722
parser: handle parsing of apc, sos, pm strings
...
This lets us detect kitty graphics.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-31 06:59:34 -06:00
Tim Culverhouse
23a00ede55
images: kitty support works well
...
We still need to handle querying for support.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-30 20:51:54 -06:00
Tim Culverhouse
ee85f49bde
window: remove old import
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-30 18:23:05 -06:00
Tim Culverhouse
f901dde2a0
images: kitty image protocol works
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-30 16:26:35 -06:00
Tim Culverhouse
cc75fe6272
image: implement transmitting images
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-30 13:30:36 -06:00
Tim Culverhouse
626a9101bd
images: move to subfolder, use union enum for implementations
...
There will only ever be a handful of image implementations. Let's just
use a union enum for handling them.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-30 07:14:34 -06:00
Tim Culverhouse
edb1fae2ab
textinput: add more readline bindings
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-29 07:00:34 -06:00
Tim Culverhouse
96f7bd6044
cell: remove todo
...
Did this one already
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-28 22:45:37 -06:00
Tim Culverhouse
e6c8be4bd6
render: use provided character width
...
As a pretty large optimization, use the provided width when possible to
avoid measuring glyphs each render
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-28 22:42:51 -06:00
Tim Culverhouse
a355d7519a
fix name
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-28 21:36:30 -06:00
Tim Culverhouse
5c9ce93a63
update ziglyph
...
update ziglyph to include proper default text emoji with VS16 selector
widths
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-28 21:35:31 -06:00
Tim Culverhouse
c99dffaecf
WIP: images
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-25 13:32:22 -06:00
Tim Culverhouse
8f311da873
vaxis: implement hyperlinks (osc8)
...
This requires additional allocations anytime there is a hyperlink
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 19:07:05 -06:00
Tim Culverhouse
9950c9eac5
vaxis: mode cleanup, initial mouse implementation
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 18:36:45 -06:00
Tim Culverhouse
85060b001f
vaxis: implement mouse shapes
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 13:36:24 -06:00
Tim Culverhouse
4c84faddfa
vaxis: implement bracketed paste
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 13:23:02 -06:00
Tim Culverhouse
400e2d5cac
vaxis: implement osc2 set title
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 13:18:24 -06:00
Tim Culverhouse
33d43dc6d1
vaxis: implement osc9 and osc777 notifications
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 13:15:04 -06:00
Tim Culverhouse
3d6f42a66e
build: remove libxev dependency
...
We aren't using this anymore
2024-01-24 11:54:58 -06:00
Tim Culverhouse
1d74a6e4d0
add license
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 11:43:59 -06:00
Tim Culverhouse
7e3ae8ffbf
add readme
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 11:43:59 -06:00
Tim Culverhouse
35fcbd05d7
update example
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 10:20:00 -06:00
Tim Culverhouse
8d496ffcdd
widgets(textinput): move key handling to ifelse block
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 09:54:22 -06:00
Tim Culverhouse
b57342726f
parser: parse 0x08 as backspace
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 06:45:24 -06:00
Tim Culverhouse
1b83dfe652
fix: don't use sixel geometry query yet
...
This query has a response that interferes with key f4. We need to fix
that parsing before doing sixel queries, and we don't even support
sixels yet.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 06:25:45 -06:00
Tim Culverhouse
9f89ed06f3
vaxis: use vt caps to measure grapheme widths
...
Implement our own grapheme measuring function which switches on whether
the terminal supports mode 2027
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-24 06:12:39 -06:00
Tim Culverhouse
04f6117cfe
vaxis: enable da1 parsing, use futex timeout to return from query
...
Now that DA1 parsing is done, block the queryTerminal function until the
DA1 response is received, or a 1 second timeout elapses. With this
functionality, move certain events into Vaxis's realm of handling: IE
enabling kitty keyboard, unicode mode, etc
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 21:30:09 -06:00
Tim Culverhouse
a2dc97c039
vaxis: add mode 2027 query parsing, wcwidth measurement
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 21:06:02 -06:00
Tim Culverhouse
ef7b30dbee
render: advance by width of grapheme
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 16:29:44 -06:00
Tim Culverhouse
aaa1c17a81
key: enable kitty keyboard
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 13:25:31 -06:00
Tim Culverhouse
44ff960cb0
caps: implement first capability response (kitty keyboard)
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 08:10:59 -06:00
Tim Culverhouse
59470f18e8
vaxis: add sync and refresh
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 07:36:44 -06:00
Tim Culverhouse
5d8f78ccd2
parser: return null events when unhandled
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 07:28:57 -06:00
Tim Culverhouse
8ac44bf3c9
key: implement better keymatching rules
...
This doesn't handle each case yet, I'm not certain that the rest of the
logic I have in go-vaxis is correct so I want to sit on it some more
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-23 06:35:56 -06:00
Tim Culverhouse
fd97fff931
text_input: add comment about ArrayList not being ideal
...
Siged-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 20:14:15 -06:00
Tim Culverhouse
d2f02897dc
render: use different internal model of screen
...
We use two screens: one which the user provides a slice of bytes for the
graphemes, and the user owns the bytes. We copy those bytes to our
internal model so that we can compare between frames
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 20:09:35 -06:00
Tim Culverhouse
1b7608f469
examples: update text_input
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 11:24:09 -06:00
Tim Culverhouse
c9c704d4a7
render: fix when we set current cursor to new style, update examples
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 11:19:28 -06:00
Tim Culverhouse
70e0cafafe
window: add hideCursor and showCursor
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 11:18:59 -06:00
Tim Culverhouse
f1a9e21a98
tty: use grapheme cache in the tty run method
...
We only need the grapheme cache when we are parsing input
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-22 10:40:30 -06:00