mod(terminal): enable termios flags corresponding to termios(3) man page
This commit is contained in:
@@ -16,3 +16,11 @@ It contains information about me and my projects as well as blog entries about s
|
|||||||
|
|
||||||
- [ ] How can I support to run a sub-process inside of a given pane / layout?
|
- [ ] How can I support to run a sub-process inside of a given pane / layout?
|
||||||
- [ ] Create demo gifs using [vhs](https://github.com/charmbracelet/vhs)
|
- [ ] Create demo gifs using [vhs](https://github.com/charmbracelet/vhs)
|
||||||
|
- [ ] How would I measure my FPS?
|
||||||
|
- [ ] Could I simulate a corresponding event loop?
|
||||||
|
- empty user event
|
||||||
|
- emmit as many as possible through another thread (until the event queue is full?)
|
||||||
|
- see how fast the application can render each frame and measure the necessary time for each _frame_?
|
||||||
|
-> determine statistics like, min, max, median, mean, etc.
|
||||||
|
-> Or buffered writer to the `std.posix.STDOUT_FILENO`?
|
||||||
|
-> I could use this to see if it makes sense to implement a buffered version using a screen buffer (to only render the differences?)
|
||||||
|
|||||||
@@ -137,13 +137,30 @@ pub fn enableRawMode(bak: *std.posix.termios) !void {
|
|||||||
var termios = try std.posix.tcgetattr(std.posix.STDIN_FILENO);
|
var termios = try std.posix.tcgetattr(std.posix.STDIN_FILENO);
|
||||||
bak.* = termios;
|
bak.* = termios;
|
||||||
|
|
||||||
termios.iflag.IXON = false;
|
// termios flags used by termios(3)
|
||||||
|
termios.iflag.IGNBRK = false;
|
||||||
|
termios.iflag.BRKINT = false;
|
||||||
|
termios.iflag.PARMRK = false;
|
||||||
|
termios.iflag.ISTRIP = false;
|
||||||
|
termios.iflag.INLCR = false;
|
||||||
|
termios.iflag.IGNCR = false;
|
||||||
termios.iflag.ICRNL = false;
|
termios.iflag.ICRNL = false;
|
||||||
|
termios.iflag.IXON = false;
|
||||||
|
|
||||||
|
// messes with output -> not used
|
||||||
|
// termios.oflag.OPOST = false;
|
||||||
|
|
||||||
termios.lflag.ECHO = false;
|
termios.lflag.ECHO = false;
|
||||||
|
termios.lflag.ECHONL = false;
|
||||||
termios.lflag.ICANON = false;
|
termios.lflag.ICANON = false;
|
||||||
termios.lflag.IEXTEN = false;
|
|
||||||
termios.lflag.ISIG = false;
|
termios.lflag.ISIG = false;
|
||||||
|
termios.lflag.IEXTEN = false;
|
||||||
|
|
||||||
|
termios.cflag.CSIZE = .CS8;
|
||||||
|
termios.cflag.PARENB = false;
|
||||||
|
|
||||||
|
termios.cc[@intFromEnum(std.posix.V.MIN)] = 1;
|
||||||
|
termios.cc[@intFromEnum(std.posix.V.TIME)] = 0;
|
||||||
|
|
||||||
try std.posix.tcsetattr(
|
try std.posix.tcsetattr(
|
||||||
std.posix.STDIN_FILENO,
|
std.posix.STDIN_FILENO,
|
||||||
|
|||||||
Reference in New Issue
Block a user