fix: added os comptime check for running ForkOut

This commit is contained in:
Grace Yoder 2026-07-06 09:49:35 -06:00
parent c228995f20
commit ec524f039c
Signed by: grace
SSH key fingerprint: SHA256:oG9v0ZlohsoMAg083HAwBGOcaPLF3nIuOlAW4MtASMo

View file

@ -45,6 +45,7 @@ pub fn main(init: std.process.Init) !void {
// I don't like this but it will stay until I review how dispatch works
// with zig since I will probably be refactoring there
linux: {
if (comptime os == .linux) {
const xdg_type = init.environ_map.get("XDG_SESSION_TYPE") orelse "";
if (std.mem.eql(u8, xdg_type, "wayland")) {
@ -57,6 +58,7 @@ pub fn main(init: std.process.Init) !void {
return;
}
}
}
// Fallback Clipboard
var clip = try Clip.OSC52.init(alloc, io, size);