|
|
@ -233,6 +233,7 @@ pub fn main() !void {
|
|
233
|
233
|
}
|
|
234
|
234
|
while (line != null and i * glyph_height < window_height) {
|
|
235
|
235
|
const line_c = try gpa.dupeZ(u8, line.?);
|
|
|
236
|
// TODO: render tabs at correct width (or some width at least)
|
|
236
|
237
|
const result_text = c.TTF_RenderUTF8_Shaded(font, line_c, white, black);
|
|
237
|
238
|
gpa.free(line_c);
|
|
238
|
239
|
const result_texture = c.SDL_CreateTextureFromSurface(renderer, result_text);
|
|
|
@ -262,8 +263,10 @@ fn runCommand(raw_cmd: []const u8, allocator: *std.mem.Allocator) ![]const u8 {
|
|
262
|
263
|
else if (std.mem.startsWith(u8, cmd, "man "))
|
|
263
|
264
|
// TODO: handle `man 5 sway`
|
|
264
|
265
|
&[_][]const u8{ "man", cmd["man ".len..] }
|
|
|
266
|
else if (std.mem.startsWith(u8, cmd, "s "))
|
|
|
267
|
&[_][]const u8{ "ag", cmd["s ".len..], "/home/luna/t/raylib/src", "/home/luna/k/the-thing/resources/ode-build/include" }
|
|
265
|
268
|
else if (cmd.len > 0 and std.ascii.isDigit(cmd[0]))
|
|
266
|
|
&[_][]const u8{ "/usr/bin/qalc", "-terse", cmd }
|
|
|
269
|
&[_][]const u8{ "qalc", "-terse", cmd }
|
|
267
|
270
|
else
|
|
268
|
271
|
&[_][]const u8{ "bash", "-c", cmd };
|
|
269
|
272
|
for (argv) |arg| {
|