mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-11 20:43:00 +01:00
mzteinit refactors
This commit is contained in:
parent
39615bf693
commit
c70ddf74dc
2 changed files with 15 additions and 2 deletions
|
@ -27,12 +27,23 @@ pub fn build(b: *std.Build) !void {
|
|||
e.root_module.addImport("common", common_mod);
|
||||
}
|
||||
|
||||
// TODO: Broken, see: https://github.com/ziglang/zig/issues/20525
|
||||
//const cg_opt = try common.confgenGet(struct {
|
||||
// gtk_theme: []const u8,
|
||||
// mzteinit_entries: []const struct {
|
||||
// key: []const u8,
|
||||
// label: []const u8,
|
||||
// cmd: []const []const u8,
|
||||
// quit: bool = false,
|
||||
// },
|
||||
//}, b.allocator);
|
||||
|
||||
const cg_opt = try common.confgenGet(struct {
|
||||
gtk_theme: []const u8,
|
||||
}, b.allocator);
|
||||
|
||||
const opts = b.addOptions();
|
||||
opts.addOption([]const u8, "gtk_theme", cg_opt.gtk_theme);
|
||||
opts.addOption(@TypeOf(cg_opt), "cg", cg_opt);
|
||||
exe.root_module.addImport("opts", opts.createModule());
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
const std = @import("std");
|
||||
const cg = @import("opts").cg;
|
||||
|
||||
const sysdaemon = @import("sysdaemon.zig");
|
||||
|
||||
const util = @import("util.zig");
|
||||
|
@ -156,7 +158,7 @@ pub fn populateEnvironment(env: *std.process.EnvMap) !bool {
|
|||
// GUI options
|
||||
{
|
||||
try env.put("QT_QPA_PLATFORMTHEME", "qt5ct");
|
||||
try env.put("GTK_THEME", @import("opts").gtk_theme); // gtk theme from confgen
|
||||
try env.put("GTK_THEME", cg.gtk_theme); // gtk theme from confgen
|
||||
|
||||
// this stops GTK from dbus-launching the mid-bogglingly pointless at-spi daemon
|
||||
try env.put("NO_AT_BRIDGE", "1");
|
||||
|
|
Loading…
Reference in a new issue