RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process
Blackout: 48 px window chrome
oxydizer61fa0a5b3eb2
diff --git a/assets/themes/blackout.toml b/assets/themes/blackout.tomlindex 36e94f2..489f5a8 100644--- a/assets/themes/blackout.toml+++ b/assets/themes/blackout.toml@@ -10,18 +10,18 @@ font = "Manrope"mono_font = "JetBrains Mono"font_size = 13title_size = 13.5-chrome_height = 50+chrome_height = 48chrome_control_gap = 8chrome_control_right_pad = 2chrome_control_offset_y = 5chrome_round_buttons = falsechrome_button_bevel = 7# Raised title tab, a 45-degree step down, and four clipped corners. The step-# is the title plate's slant moved out by the plate inset: 310 wide, 38 slant-# (50 - 2 * 6) and inset 6 give x - y = 266 + 6 * sqrt(2). Change them together.-# Below ~296 px wide the outline cannot fit and the window uses rounded corners;+# is the title plate's slant moved out by the plate inset: 310 wide, 36 slant+# (48 - 2 * 6) and inset 6 give x - y = 268 + 6 * sqrt(2). Change them together.+# Below ~298 px wide the outline cannot fit and the window uses rounded corners;# maximized windows stay rectangular.-window_shape = "0 14, 14 0, 274.5 0, 281.5 7, -14 7, -0 21, -0 -12, -12 -0, 12 -0, 0 -12"+window_shape = "0 14, 14 0, 276.5 0, 283.5 7, -14 7, -0 21, -0 -12, -12 -0, 12 -0, 0 -12"window_bg = "#111516"window_fg = "#E3E5E3"window_dim = "#A2A8A6"@@ -32,12 +32,12 @@ window_divider = "#2A3030"window_title_plate = "#FAEB01"window_title_plate_width = 310window_title_plate_fg = "#111400"-# Plate geometry; slant is a fraction of chrome_height (38 of 50: 45 degrees).+# Plate geometry; slant is a fraction of chrome_height (36 of 48: 45 degrees).# With an outline the plate follows its cut corners at the inset; the bevel# applies to rectangular (maximized) frames.window_title_plate_inset = 6window_title_plate_bevel = 7-window_title_plate_slant = 0.76+window_title_plate_slant = 0.75window_title_plate_control_gap = 8window_title_plate_text_padding = 8window_corner_accent = "#FAEB01"diff --git a/tests/blackout.py b/tests/blackout.pyindex 6a6bd34..d214799 100644--- a/tests/blackout.py+++ b/tests/blackout.py@@ -92,7 +92,7 @@ def run(scale):assert colors.get((26, 32, 33), 0) > 30, colorsassert colors.get((52, 61, 62), 0) > 30, colorsdebug = ipc.get_window_debug(wid)- assert debug["titlebar_height"] == 50, debug+ assert debug["titlebar_height"] == 48, debugassert debug["frame_border"] == debug["footer_height"] == 2, debugcontrols = {w["name"]: w for w in ipc.get_widget_tree(f"window/{wid}")["widgets"]}close = controls["close"]["box"]diff --git a/tests/blackout_config.py b/tests/blackout_config.pyindex e83ddcd..2c08417 100644--- a/tests/blackout_config.py+++ b/tests/blackout_config.py@@ -87,7 +87,8 @@ def check_border(ipc, wid, scale, tmp, capture):ipc.move_cursor(body["x"] + body["width"] // 2, body["y"] + body["height"] // 2)image = capture()x = round((frame["x"] + frame["width"] / 2) * scale)- bottom = round((frame["y"] + frame["height"]) * scale)+ # Edges snap half up; Python's round() would take 928.5 to 928.+ bottom = int((frame["y"] + frame["height"]) * scale + .5)for offset in range(int(border * scale + .5)):pixel = image.getpixel((x, bottom - 1 - offset))assert max(abs(a - b) for a, b in zip(pixel, (115, 124, 104))) <= 3, (border, offset, pixel)diff --git a/tests/blackout_resize.py b/tests/blackout_resize.pyindex e3eb0c7..9c4c52b 100644--- a/tests/blackout_resize.py+++ b/tests/blackout_resize.py@@ -31,7 +31,7 @@ def check_narrow(ipc, scale, tmp, capture, crop):config = original.replace('[compositor]', '[compositor]\nwindow_tab_apps = ["blackout-narrow"]', 1) if grouped else originalconfig_path.write_text(config)ipc.reload_config()- for width in (360, 292, 291, 278, 270, 250, 210, 360):+ for width in (360, 294, 293, 278, 270, 250, 210, 360):ipc.action("set_window_size", {"id": wid, "width": width, "height": 300})wait_for(lambda: ipc.get_window_debug(wid)["client_box"]["width"] == width,f"narrow resize to {width}")@@ -45,9 +45,9 @@ def check_narrow(ipc, scale, tmp, capture, crop):ipc.wait_for_frame()fallback = capture()same = crop(actual, box, rect).tobytes() == crop(fallback, box, rect).tobytes()- # The raised step and the right chamfer need 295.5 logical px,+ # The raised step and the right chamfer need 297.5 logical px,# including the two 2 px borders around the client.- assert same == (box["width"] < 295.5), (grouped, width, box, same)+ assert same == (box["width"] < 297.5), (grouped, width, box, same)config_path.write_text(config)ipc.reload_config()ipc.wait_for_frame()