From 07794019dc6a20fc26bd5123b3b9b7f4648d00f9 Mon Sep 17 00:00:00 2001 From: Ben Buhse Date: Tue, 24 Feb 2026 16:40:58 -0600 Subject: [PATCH] Move old TODO comments to docs/TODO.md --- docs/TODO.md | 9 +++++++++ src/Bar.zig | 2 -- src/Config.zig | 1 - src/Output.zig | 3 --- src/WallpaperImage.zig | 1 - src/WindowManager.zig | 1 - src/XkbBindings.zig | 9 --------- src/config/BarConfig.zig | 2 -- src/config/window_rule.zig | 2 +- 9 files changed, 10 insertions(+), 20 deletions(-) diff --git a/docs/TODO.md b/docs/TODO.md index f8f1636..5136745 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -2,6 +2,7 @@ These are in rough order of my priority, though no promises I do them in this order. +- [ ] Add config for single-window width ratio (mostly because my ultrawide makes a single window massive) - [ ] Check pointer position and only warp if not on focused window already - [ ] Change focus direction when closing window - [ ] Use set_xcursor_theme request @@ -17,6 +18,14 @@ These are in rough order of my priority, though no promises I do them in this or - [ ] Support multiple seats - [ ] Support clipping floating windows on edge of/between outputs - [ ] Use per-output timerfds for tag overlay instead of a single shared one +- [ ] Support configurable focus-follows-window on send-to-output +- [ ] Support configurable prepend/append on send-to-output +- [ ] Support taking new output's tags on send-to-output +- [ ] Add bar padding to config +- [ ] Support 12-hour clock format (maybe take any time format string?) +- [ ] Support per-output bar visibility +- [ ] Support more window rule options (e.g. ssd/csd) +- [ ] Add `spawn_tagmask`, `focus_previous_tags`, `send_to_previous_tags` commands - [x] Support changeable primary ratio - [x] Support changeable primary count - [x] Support multiple outputs diff --git a/src/Bar.zig b/src/Bar.zig index 79ae538..17fe155 100644 --- a/src/Bar.zig +++ b/src/Bar.zig @@ -86,7 +86,6 @@ pub fn initSurface(bar: *Bar) !void { defer empty_region.destroy(); wl_surface.setInputRegion(empty_region); - // TODO: Add padding to config const vertical_padding = 5; // Set size wants logical pixels, so we have to scale the height const logical_font_height = @divFloor(bar.fcft_fonts.height, @as(i32, bar.font_scale)); @@ -220,7 +219,6 @@ pub fn render(bar: *Bar) !void { // Convert time to a string var buf: [255:0]u8 = undefined; var fbs = io.fixedBufferStream(&buf); - // TODO: Support 12-hour clock (%I:%M) try dt.strftime(fbs.writer(), "%H:%M"); // Convert ASCII text string to unicode diff --git a/src/Config.zig b/src/Config.zig index b6521a0..11b2942 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -27,7 +27,6 @@ focus_follows_pointer: bool = true, /// Should the pointer warp to the center of newly-focused windows pointer_warp_on_focus_change: bool = true, -// TODO: Implement a color when this is null /// Path to the wallpaper image wallpaper_image_path: ?[]const u8 = null, diff --git a/src/Output.zig b/src/Output.zig index e4c74d9..1772ae7 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -207,7 +207,6 @@ fn riverOutputListener(river_output_v1: *river.OutputV1, event: river.OutputV1.E blk: { // If the removed output was focused, move focus to the next // available output (and its first window, if any). - // TODO: Support multiple seats const seat = wm.seats.first() orelse break :blk; if (seat.focused_output != output) break :blk; @@ -622,8 +621,6 @@ pub fn render(output: *Output) void { } } -// TODO - CONFIG: Allow primary on the left -// TODO - CONFIG: Allow setting a ratio for single-window width (useful for ultrawides) /// Calculate primary/stack layout positions for all windows. /// - Single window: maximized /// - Multiple windows: stack (45% left, vertically tiled), primary (55% right) diff --git a/src/WallpaperImage.zig b/src/WallpaperImage.zig index 60c562c..921b252 100644 --- a/src/WallpaperImage.zig +++ b/src/WallpaperImage.zig @@ -14,7 +14,6 @@ argb_pixels: if (native_endian == .big) std.ArrayList(u32) else void = if (nativ // This is the actual scaled, transformed, and rendered image pix_image: *pixman.Image, -// TODO: Make image_path nullable, if null, do a single color with a single_pixel_buffer instead(?) pub fn create(image_path: []const u8) !*WallpaperImage { var wallpaper_image = try utils.gpa.create(WallpaperImage); errdefer utils.gpa.destroy(wallpaper_image); diff --git a/src/WindowManager.zig b/src/WindowManager.zig index 8f0e1f3..2c8de3c 100644 --- a/src/WindowManager.zig +++ b/src/WindowManager.zig @@ -237,7 +237,6 @@ fn windowManagerV1Listener(window_manager_v1: *river.WindowManagerV1, event: riv } }, .seat => |ev| { - // TODO: Support multi-seat (maybe ?) const river_seat_v1 = ev.id; const river_seat_v1_version = river_seat_v1.getVersion(); if (river_seat_v1_version < MIN_RIVER_SEAT_V1_VERSION) { diff --git a/src/XkbBindings.zig b/src/XkbBindings.zig index 3aa41fe..1141549 100644 --- a/src/XkbBindings.zig +++ b/src/XkbBindings.zig @@ -27,10 +27,6 @@ pub const Command = union(enum) { set_window_tags: u32, toggle_output_tags: u32, toggle_window_tags: u32, - // spawn_tagmask: u32, // TODO - // focus_previous_tags, // TODO - // send_to_previous_tags, // TODO - // Move floating window by pixels move_up: i32, move_down: i32, @@ -250,7 +246,6 @@ const XkbBinding = struct { } }, .set_output_tags => |tags| { - // TODO: Support multiple seats const seat = first_seat orelse return; const output = seat.focused_output orelse return; output.pending_manage.tags = tags; @@ -265,7 +260,6 @@ const XkbBinding = struct { context.wm.river_window_manager_v1.manageDirty(); }, .toggle_output_tags => |tags| { - // TODO: Support multiple seats const seat = first_seat orelse return; const output = seat.focused_output orelse return; const old_tags = output.pending_manage.tags orelse output.tags; @@ -363,9 +357,6 @@ const XkbBinding = struct { } } - // TODO - CONFIG: Allow configuring whether focus follows the window - // TODO - CONFIG: Allow configuring whether window is prepended or appended - // TODO - CONFIG: Allow taking new output's tags fn sendWindowToOutput(context: *Context, direction: FocusDirection) void { const wm = context.wm; const seat = wm.seats.first() orelse return; diff --git a/src/config/BarConfig.zig b/src/config/BarConfig.zig index 657928a..5e3b23c 100644 --- a/src/config/BarConfig.zig +++ b/src/config/BarConfig.zig @@ -23,8 +23,6 @@ margin_top: i32 = 0, margin_right: i32 = 0, margin_bottom: i32 = 0, margin_left: i32 = 0, -// TODO: Support only having the bar on specific outputs -// output: []const u8, pub fn toBarOptions(config: BarConfig) Bar.Options { return .{ diff --git a/src/config/window_rule.zig b/src/config/window_rule.zig index dcdddc4..a6612df 100644 --- a/src/config/window_rule.zig +++ b/src/config/window_rule.zig @@ -6,7 +6,7 @@ const NodeName = enum { float, no_float, tags, - // TODO: Add more of riverctl's rule options such as ssd/csd + }; pub const Rule = struct {