Commit Graph
10 Commits
Author SHA1 Message Date
huntedbytheirs 9b1eb30937 perf(fix): implement dynamic Config arrays (missed from wave2)
The dynamic Config array conversion (Todo 2.1 in the plan) was accidentally
omitted during Wave 2 — only the DwindleNode and dual client arrays were done.
This commit implements the missing work:

- Convert Config keybinds/buttons/scrolls from fixed-size arrays
  (keybinds[128]) to pointer+count+cap (keybinds, nkeybinds, keybinds_cap)
- config_load allocates with ecalloc(16) for each array, doubles on overflow
- on_config_reload and do_reload use deep-copy protocol:
  free old arrays → *newcfg → zero source pointers
- sizeof(Config): ~250 KB → ~28 KB (latest measurement)
- Zero-warning build
2026-07-03 00:05:16 -04:00
huntedbytheirs fb0f49e861 perf(wave1): reduce Config caps, reorder Client/Monitor for cache
Wave 1 changes:
- Reduce CFG_MAX_KEYBINDS 256→128, CFG_MAX_STRLEN 256→64, CFG_MAX_ARGS 16→8
  → saves ~2.5 MB BSS from Config struct
- Add truncation warnings to config_load when keybind/button/scroll limit reached
- Reorder Client struct: HOT fields (type, mon, tags, floating flags, geom) in first
  cache line, COLD fields (wl_listeners) at end — saves cache misses in arrange()
- Reorder LayerSurface struct similarly
- Split Monitor into Monitor/MonitorCold: hot fields (~120B) stay inline, cold layout
  state lazily allocated on first dwindle/master use
- All cold-field accesses through m->cold-> indirection
- cleanupmon frees m->cold
- Zero-warning build with clang -Werror -Wpedantic
2026-07-02 23:35:37 -04:00
huntedbytheirs d3999a9d3c Fix rounded corners
they were being dumb
2026-07-02 23:00:13 -04:00
huntedbytheirs e6613f766d refactor(parser): export parse_color_hex for compositor use
Remove 'static' from parse_color_hex() in parser.c and add a public
declaration to parser.h so src/peachwm.c can call it for shadow color
conversion. No changes to function body.
2026-07-02 19:44:06 -04:00
huntedbytheirs 4ac03d4059 feat(effects): implement window rounded corners via scenefx
- Parse effects.windows.rounded/rounding from Lua config
- Add CfgEffectsWindows and CfgEffects structs to Config
- Switch to fx_renderer_create for scenefx support
- Replace 5 wlr/types/wlr_scene.h includes with scenefx variant
- Add config_get_corner_radius() helper (light=6px, heavy=14px)
- Apply corner_radii_top/bottom/left/right to 4 border rects
- Apply wlr_scene_buffer_set_corner_radius to surface buffers
- Disable on fullscreen, restore on exit
- Re-apply on resize and config hot-reload
- Add -Wno-extra-semi for scenefx header compatibility
- All targets compile cleanly (make test passes)
2026-07-02 05:00:26 -04:00
huntedbytheirs 969a6c4ecb refactor: replace C11 keywords with C23 equivalents, NULL→nullptr, remove stdbool.h 2026-07-02 02:02:09 -04:00
huntedbytheirs b5ccb2621b Massive code refactor 2026-07-02 01:24:16 -04:00
huntedbytheirs 02708b12c8 Add scratchpad
Added scratchpads
2026-06-29 16:35:52 -04:00
huntedbytheirs 667dad864a Add workspace starting layouts 2026-06-28 19:41:21 -04:00
huntedbytheirs 763512a24f peachwm birth 2026-06-28 17:26:07 -04:00