a modern tui library written in zig
18
fork

Configure Feed

Select the types of activity you want to include in your feed.

readme: fix example

Fixes: #36

+3 -4
+3 -4
README.md
··· 94 94 95 95 96 96 // The event loop requires an intrusive init. We create an instance with 97 - // stable points to Vaxis and our TTY, then init the instance. Doing so 97 + // stable pointers to Vaxis and our TTY, then init the instance. Doing so 98 98 // installs a signal handler for SIGWINCH on posix TTYs 99 99 // 100 100 // This event loop is thread safe. It reads the tty in a separate thread 101 101 var loop: vaxis.Loop(Event) = .{ 102 102 .tty = &tty, 103 - .vaxis = &vaxis, 103 + .vaxis = &vx, 104 104 }; 105 105 try loop.init(); 106 106 ··· 117 117 118 118 // init our text input widget. The text input widget needs an allocator to 119 119 // store the contents of the input 120 - var text_input = TextInput.init(alloc); 120 + var text_input = TextInput.init(alloc, &vx.unicode); 121 121 defer text_input.deinit(); 122 122 123 123 // Sends queries to terminal to detect certain features. This should always ··· 127 127 while (true) { 128 128 // nextEvent blocks until an event is in the queue 129 129 const event = loop.nextEvent(); 130 - std.log.debug("event: {}", .{event}); 131 130 // exhaustive switching ftw. Vaxis will send events if your Event enum 132 131 // has the fields for those events (ie "key_press", "winsize") 133 132 switch (event) {