This is in a very rough proof of concept stage right now. I’m learning how to translate from C to Zig and call Gtk functions, work with Gtk pointer types in Zig, etc as I go. And I haven’t had a lot of time yet to work on it. Right now this is just a barebones terminal, but it is planned to have tabs and the ability to do split panes, while staying lightweight. I don’t plan on having a menubar or extensive configuration beyond things like setting colors and font, because there’s plenty of options like Gnome terminal or XFCE terminal that have all the bells and whistles.
I originally started something similar in Rust, but have had frequent roadblocks due to incomplete bindings. I actually had to fork a couple of the crates in order to use them with newer Gtk crates. I thought I’d try this in Zig as theoretically I won’t need bindings. In practice, at the very least the
g_signal_connect function must be re-implemented because it is defined with an ugly macro, but other than that it seems I’m just making very frequent use of @ptrCast, @intToEnum and now @alignCast in order to pass pointers into the callbacks.
The basic roadmap, from my last commit:
Date: Thu May 20 09:46:12 2021 -0400
Basic working terminal with tab creation in a separate function TODO: * Add widgets to structs and pass structs of widgets around to callbacks * Close terminal by removing page from notebook instead of destroying widget (depends on above) * Add tab creation button as notebook action widget * Implement keypress handling * Implement command line options for: * Run custom command * Specify working directory * Specify terminal size * Setting titles for tab and window * Implement some basic configuration in a configuration file, possibly with gui * Specify colors * Specify fonts * Specify shell or fallback to user shell? * Keep this part simple * Implement split panes as simply as possible * Not highest priority but must be planned for. Need a way to keep track of open terminals dynamically, and tabs will have to refer to a parent container and not the actual vte widget.