attach-mode: implement after <N>

This commit is contained in:
Orfeas
2024-01-03 16:33:13 +02:00
committed by Isaac Freund
parent 6e9bd83e1d
commit 6a71fc65b0
6 changed files with 75 additions and 20 deletions

View File

@ -36,6 +36,7 @@ const LockSurface = @import("LockSurface.zig");
const OutputStatus = @import("OutputStatus.zig");
const SceneNodeData = @import("SceneNodeData.zig");
const View = @import("View.zig");
const AttachMode = @import("Config.zig").AttachMode;
const log = std.log.scoped(.output);
@ -166,6 +167,8 @@ current: struct {
/// Remembered version of tags (from last run)
previous_tags: u32 = 1 << 0,
attach_mode: ?AttachMode = null,
/// List of all layouts
layouts: std.TailQueue(Layout) = .{},
@ -608,3 +611,7 @@ pub fn handleLayoutNamespaceChange(self: *Self) void {
pub fn layoutNamespace(self: Self) []const u8 {
return self.layout_namespace orelse server.config.default_layout_namespace;
}
pub fn attachMode(self: Self) AttachMode {
return self.attach_mode orelse server.config.default_attach_mode;
}