1ad23272
Import terminal config directly in main
a73x 2026-04-09 06:56
Commit message
build.zig
| Old | New | ||
|---|---|---|---|
| @@ -60,6 +60,7 @@ pub fn build(b: *std.Build) void { | |||
| 60 | }); | 60 | }); |
| 61 | exe_mod.addImport("vt", vt_mod); | 61 | exe_mod.addImport("vt", vt_mod); |
| 62 | exe_mod.addImport("wayland-client", wayland_mod); | 62 | exe_mod.addImport("wayland-client", wayland_mod); |
| 63 | exe_mod.addImport("config", config_mod); | ||
| 63 | 64 | ||
| 64 | const exe = b.addExecutable(.{ | 65 | const exe = b.addExecutable(.{ |
| 65 | .name = "waystty", | 66 | .name = "waystty", |
| @@ -109,6 +110,7 @@ pub fn build(b: *std.Build) void { | |||
| 109 | }); | 110 | }); |
| 110 | main_test_mod.addImport("vt", vt_mod); | 111 | main_test_mod.addImport("vt", vt_mod); |
| 111 | main_test_mod.addImport("wayland-client", wayland_mod); | 112 | main_test_mod.addImport("wayland-client", wayland_mod); |
| 113 | main_test_mod.addImport("config", config_mod); | ||
| 112 | const main_tests = b.addTest(.{ | 114 | const main_tests = b.addTest(.{ |
| 113 | .root_module = main_test_mod, | 115 | .root_module = main_test_mod, |
| 114 | }); | 116 | }); |
src/font.zig
| Old | New | ||
|---|---|---|---|
| @@ -1,5 +1,5 @@ | |||
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | pub const config = @import("config"); | 2 | const config = @import("config"); |
| 3 | const c = @cImport({ | 3 | const c = @cImport({ |
| 4 | @cInclude("fontconfig/fontconfig.h"); | 4 | @cInclude("fontconfig/fontconfig.h"); |
| 5 | @cInclude("ft2build.h"); | 5 | @cInclude("ft2build.h"); |
src/main.zig
| Old | New | ||
|---|---|---|---|
| @@ -4,7 +4,7 @@ const pty = @import("pty"); | |||
| 4 | const wayland_client = @import("wayland-client"); | 4 | const wayland_client = @import("wayland-client"); |
| 5 | const renderer = @import("renderer"); | 5 | const renderer = @import("renderer"); |
| 6 | const font = @import("font"); | 6 | const font = @import("font"); |
| 7 | const config = font.config; | 7 | const config = @import("config"); |
| 8 | 8 | ||
| 9 | const c = @cImport({ | 9 | const c = @cImport({ |
| 10 | @cInclude("xkbcommon/xkbcommon-keysyms.h"); | 10 | @cInclude("xkbcommon/xkbcommon-keysyms.h"); |