Tim Culverhouse
fa39f0a067
window: saturate size, export Color
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-03-01 21:29:16 -06:00
Tim Culverhouse
c662de4df0
lib: export Segment, PrintOptions, and ziglyph
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-03-01 12:28:48 -06:00
Tim Culverhouse
e281a67a43
window: add print method
...
Add a print method with multiple print options
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-03-01 12:28:29 -06:00
Tim Culverhouse
2fab89f2cb
screen: allow reading of cells
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-03-01 12:28:03 -06:00
Tim Culverhouse
9dae256960
border: add right border
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-03-01 12:27:49 -06:00
Tim Culverhouse
cf71bb4e7c
queue: fix thread safety
...
Fix thread safety with changes by leeward on IRC. leeward put this code
on sourcehut here: https://hg.sr.ht/~nmichaels/threadsafeq
2024-03-01 12:25:15 -06:00
Tim Culverhouse
dff38f84d1
border: fix all border limits
2024-02-28 16:14:55 -06:00
Tim Culverhouse
ba29a71b3b
tty: change logged line to level debug
2024-02-27 07:44:59 -06:00
00JCIV00
e87d64a2b3
Added the table.zig
example
...
- Created a basic user management example for the Table widget.
2024-02-26 19:27:56 -06:00
00JCIV00
923c81d7d2
widgets: added table widget
...
- Added `Table.zig` under the `src/widgets` directory and `widgets.zig` module.
- Created the `drawTable()` function to draw a Table to the provided parent Window based on the provided ArrayList.
- Created the `TableContext` struct to manage state and attributes for the `drawTable()` function.
2024-02-26 19:21:12 -06:00
00JCIV00
b57aab7040
Added the "matchesAny()" method to Keys
2024-02-26 19:21:12 -06:00
00JCIV00
70f1e3495c
Changed log.info calls to log.debug for better release builds
2024-02-26 19:21:12 -06:00
00JCIV00
4a87c5f408
Added public Window declaration to main.zig
2024-02-26 19:21:12 -06:00
Tim Culverhouse
f84bad6420
tty: set termios ISIG = false and PARMRK = false
...
When changing to the new zig termios api, I missed setting two flags.
This left SIGINTs being sent to the terminal and applications not able
to handle ctrl+c.
2024-02-26 18:26:12 -06:00
Tim Culverhouse
9d87579076
key: remove duplicate match rule
2024-02-24 19:42:35 -06:00
Tim Culverhouse
d51530cb73
parser: don't encode tab and enter as ctrl+I and ctrl+m
2024-02-24 19:25:45 -06:00
Tim Culverhouse
981932debd
queue: make public
2024-02-24 08:14:12 -06:00
Tim Culverhouse
0d730aba80
queue: update comments, add tryPop
...
Update comments on queue, and add a tryPop function which is nonblocking
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-02-19 10:11:18 -06:00
drust
6461e6719c
Fixed the .len
2024-02-18 21:39:52 -06:00
Tim Culverhouse
8d0f73e951
gwidth: add no_zwj measurement method
...
Add the no_zwj measurement method which measures the same as unicode,
but strips all ZWJs from the input string. This mimics how Kitty
measures graphemes
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-02-18 12:26:23 -06:00
Tim Culverhouse
6418570819
update for zig-0.12.0-2809
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-02-18 12:20:47 -06:00
Jora Troosh
4a463cfa3a
refactor: make code more idiomatic
...
- Added standard .gitattributes file for Zig projects.
- Reworked build.zig a little, hopefully it's a bit clearer. Also, now zig build will run all steps.
- outer: while in examples was redundant since there's only one loop to break from. switch expressions don't allow breaking from them, so breaking is only for loops, i.e. while and for.
- When returning a struct instance from a function, the compiler infers the return type from function signature, so instead of return MyType{...}; , it's more idiomatic to write return .{...};.
- Logging adds a new line by default, so you don't usually need to write \n like here: log.debug("event: {}\r\n", .{event});.
2024-02-11 12:59:33 -06:00
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