93 Commits
Author SHA1 Message Date
huntedbytheirs 0b3a02b630 fix(client): use wlr_xwayland_surface.class instead of cls
CI Build Test / build-test (push) Canceled after 0s
wlroots 0.20 renamed the WM_CLASS field from cls to class, which
broke compilation of client_get_appid().
2026-08-08 15:31:20 -04:00
huntedbytheirs cbaf5a7756 fix patch 2026-07-16 15:50:58 -04:00
huntedbytheirs f317fd53e9 Update 2026-07-06 00:09:14 -04:00
huntedbytheirs 48a4aed0ec test(scale): add automated tests, manual QA checklist, and build integration
- Automated scale tests: float tolerance, safety guard, ceilf fallback
- Manual QA checklist: 8 items covering fractional, mixed-DPI, XWayland
- Build: test_scale Makefile target (standalone C23, no wlroots deps)
2026-07-05 21:53:30 -04:00
huntedbytheirs dac0b4fa6f fix(monitor): update surface scale on monitor migration and config reload
- Add client_update_scale() in setmon() after c->mon assignment

- Add client + layer surface scale iteration in reapply_monitor_config()

- Verify outputmgrapplyortest→updatemons propagation chain (no changes needed)
2026-07-05 21:46:42 -04:00
huntedbytheirs 07d4db0c15 fix(output): propagate scale changes to all surface types on output reconfiguration
- Hook scale re-notification into updatemons() enabled-output loop
- Covers: clients, XDG popups, layer surfaces, layer popups
- Hook scale into commitlayersurfacenotify() runtime commit path
- Remove __attribute__((unused)) from layersurface_update_scale
- Add XWayland integer fallback documentation comments
2026-07-05 21:43:47 -04:00
huntedbytheirs 7dfed7bd27 chore(evidence): add wave 1 scale-update research evidence
- task-2: fractional-scale-v1 research notes for client surfaces
- task-3: fractional-scale-v1 research notes for layer surfaces + transparency/blur notes
2026-07-05 21:36:58 -04:00
huntedbytheirs 4e388d9f4f feat(client): add client_update_scale and layersurface_update_scale
- client_update_scale(): re-notifies clients when output scale changes
  using current_outputs max scale (avoids stale c->mon for floating windows)
- layersurface_update_scale(): same logic for layer shell surfaces (static)
- Initialize current_scale on initial commit for both surface types
- Uses 0.001f tolerance for float comparison to prevent redundant events
- Falls back to c->mon->wlr_output->scale if no current_outputs
2026-07-05 21:36:41 -04:00
huntedbytheirs 8b91bc939c feat(client): add current_scale field to Client and LayerSurface structs
- Add float current_scale to Client struct (HOT section, after corner_radius)
- Add float current_scale to LayerSurface struct (HOT section, after mapped)
- Add config scale range validation [0.25, 4.0] with fprintf warnings
2026-07-05 21:32:22 -04:00
huntedbytheirs 720f3e7136 ci(makefile.yml): update workflow to remove tcc and include lld 2026-07-05 20:42:16 -04:00
huntedbytheirs 33f7264184 build(Makefile): auto-deps (-MMD -MP) and .PHONY targets
- Add -MMD -MP to CFLAGS and SMSG_CFLAGS for auto-generated
  header dependency files (*.d) in objects/ subdirs
- Add -include directive to load .d files so header changes
  trigger rebuilds without manual Makefile updates
- Declare abstract targets as .PHONY to prevent collisions
  with files named clean/all/debug/release/etc.
- Add .d cleanup to make target
2026-07-05 20:36:07 -04:00
huntedbytheirs 05c682b7d3 docs(README): clarify Clang+LLD requirements and build targets
Improve the build instructions to explicitly call out Clang and LLD
as required dependencies, and differentiate between development builds
(make) and production builds (make release) with what each provides.
2026-07-05 20:30:00 -04:00
huntedbytheirs 79e7e26a49 build(Makefile): LLD linker, objects/ dir, LTO+linker opts
- Compiler selection: Remove TCC, default to Clang, GCC fallback
- LLD linker: -fuse-ld=lld for all builds (peachwm + peachmsg)
- Object relocation: .o files output to objects/{src,parser,protocols,peachmsg}/
- Clean target: rm -rf objects + transitional stale .o cleanup
- Release: -flto=thin, linker opts (gc-sections, icf=safe, z now, etc.)
- Release: strip both peachwm and peachmsg binaries
- README + CONTRIBUTING: Add LLD dependency, update build docs
- .gitignore: Add objects/ directory
2026-07-05 20:27:47 -04:00
huntedbytheirs 2773724d77 Fix scratchpad segmentation fault 2026-07-04 03:44:32 -04:00
huntedbytheirs 2c62542e0b fix: remove inotify_rm_watch that caused infinite config-reload loop
inotify_rm_watch() generates IN_IGNORED events into the inotify
queue, which immediately triggers another watch_dispatch() call,
which calls inotify_rm_watch() again, generating another IN_IGNORED
ad infinitum. This pegs the CPU and makes input laggy on every
config reload.

Fix by removing inotify_rm_watch() entirely. inotify_add_watch()
alone handles both cases:
- Same inode: modifies the existing watch (no event generated)
- New inode (delete-and-recreate): creates a new watch; old watch
  on the unlinked inode generates a single IN_IGNORED (one-shot,
  not a loop)
2026-07-03 10:35:36 -04:00
huntedbytheirs e117ff3e8d update config 2026-07-03 05:36:07 -04:00
huntedbytheirs 4998d46612 penis 2026-07-03 05:17:24 -04:00
huntedbytheirs f7a32ed7ad dcik 2026-07-03 05:10:51 -04:00
huntedbytheirs e1e7c23d1c again 2026-07-03 04:43:09 -04:00
huntedbytheirs 143db082c5 Update readme sadly 2026-07-03 04:42:41 -04:00
huntedbytheirs f8779ee7de Add back everything due to a bug 2026-07-03 04:32:57 -04:00
huntedbytheirs 86b5794fa3 docs: update example/config.lua with rule field descriptions 2026-07-03 04:21:18 -04:00
huntedbytheirs 0fac17ee84 compositor: extend applyrules, guard toggles, gate effects at render time only 2026-07-03 04:20:35 -04:00
huntedbytheirs 310be15cf3 parser: add CfgApplyEffects struct, extend CfgRule and parse_rules() 2026-07-03 04:17:40 -04:00
huntedbytheirs 6f8f2bbf94 Revert "parser: add CfgApplyEffects struct and extend CfgRule with fullscreen, can_float, can_fullscreen, apply_effects"
This reverts commit 690c328c38.
2026-07-03 04:13:54 -04:00
huntedbytheirs 010e885cdf fix: defer setmon() after scene_surface creation to prevent segfault on window map
Root cause: applyrules() called setmon() which called resize(), but
resize() dereferences c->scene_surface->node before c->scene_surface
was created in mapnotify(). Fix by storing target monitor/tags in
pending_mon/pending_tags fields and calling setmon() after scene
nodes exist.

The crash affected all new windows, not just Firefox (which was
the first tested).
2026-07-03 04:11:21 -04:00
huntedbytheirs f923ca83fd fix: move applyrules() before effect creation in mapnotify, guard border_bg null derefs 2026-07-03 03:48:57 -04:00
huntedbytheirs f32e74de8c docs: update example/config.lua with documentation comments for all rule fields 2026-07-03 03:39:12 -04:00
huntedbytheirs 4ca74f47a5 compositor: extend reapply_client_rules() with full rule re-application on reload 2026-07-03 03:37:37 -04:00
huntedbytheirs 48fed41a93 compositor: gate all rendering effects (shadow, blur, transparency, rounding, border, sloppy_focus) with per-rule toggles 2026-07-03 03:36:06 -04:00
huntedbytheirs e31c11e65c compositor: extend applyrules() with new fields, activate fullscreen in mapnotify, guard togglefloating/togglefullscreen 2026-07-03 03:31:42 -04:00
huntedbytheirs 7a01cd9db3 client: add ClientRuleEffects, can_float, can_fullscreen to Client struct 2026-07-03 03:29:56 -04:00
huntedbytheirs 99eb9686c5 parser: extend parse_rules() with fullscreen, can_float, can_fullscreen, string coercion, apply_effects sub-table 2026-07-03 03:28:43 -04:00
huntedbytheirs 690c328c38 parser: add CfgApplyEffects struct and extend CfgRule with fullscreen, can_float, can_fullscreen, apply_effects 2026-07-03 03:26:22 -04:00
huntedbytheirs f5abfe5bc6 Add transparency + Blur 2026-07-03 02:34:29 -04:00
huntedbytheirs 5327a22a63 update ci again 2026-07-03 00:43:34 -04:00
huntedbytheirs 8660652825 Update ci/cd 2026-07-03 00:39:29 -04:00
huntedbytheirs 5e2f0095d0 revert stupid v2 2026-07-03 00:07:45 -04:00
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 a5c64bcac4 perf(wave3): IPC buffer reuse, listener pooling, lazy shadows
Wave 3 changes:
- Static JSON buffer reuse across IPC calls: file-scope json_shared_buf/json_shared_cap,
  json_init allocates once via malloc, json_finish is no-op, json_grow reallocs static buffer
  → eliminates ~30 malloc/free pairs per IPC test workload
- Capped lazy IPC payload: payload_size capped at 64KB, first alloc is min(size+1, 65536),
  subsequent reallocs only when new payload larger than current allocation
  → bounds worst-case per-client allocation
- Embedded wl_listeners: IdleInhibitorTrack and PopupCommitTrack wrapper structs replace
  bare heap-allocated listeners; LISTEN_STATIC macro deprecated
  → consolidates listener + state into one allocation
- Lazy shadow allocation: shadow kept alive across config reload (set_enabled(false) instead
  of destroy); zero shadow allocations for users with shadows disabled
  → eliminates per-client shadow overhead for non-shadow users
- Zero-warning build with clang -Werror -Wpedantic
2026-07-02 23:54:38 -04:00
huntedbytheirs 7f3cad8cb6 perf(wave2): dynamic config arrays, flat dwindle tree, dual client arrays
Wave 2 changes:
- Dynamic Config arrays with geometric growth (cap=16, 2x growth)
  → saves ~2.5 MB heap for typical configs vs fixed 128-entry arrays
- Proper deep-copy protocol in on_config_reload/do_reload (free old, move new, zero source)
- Flat DwindleTree array with int children[2]/parent indices
  → eliminates pointer chasing, contiguous allocation, iterative two-pass recalc
- Lazy per-tag allocation (DwindleTree.nodes starts NULL, allocates on first use)
- Dual client_arr + fstack_arr arrays alongside wl_list/fstack for cache-friendly iteration
  → arrange() and focustop() use array scan instead of linked-list pointer chase
- All arrays maintain size-tracking (nclients, nfstack) for bounds checking
- Zero-warning build with clang -Werror -Wpedantic
2026-07-02 23:50:43 -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 cd0e5ec1eb Update readme
scenefx
2026-07-02 23:03:28 -04:00
huntedbytheirs d3999a9d3c Fix rounded corners
they were being dumb
2026-07-02 23:00:13 -04:00
huntedbytheirs 8478762828 feat(shadow): implement window drop shadows via SceneFX
Add wlr_scene_shadow node creation in mapnotify() with correct z-order
(wlr_scene_node_place_below for shadow-behind-borders). Update shadow
size/position/color/radius/blur/clip on every resize() with config-driven
visibility logic respecting fullscreen_shadows, nogaps_shadows, and
only_floating flags. Re-apply shadow on config hot-reload via
reapply_client_appearance() — create or destroy shadow nodes as needed.

Colors are premultiplied alpha per SceneFX API requirements.
2026-07-02 19:44:57 -04:00
huntedbytheirs e4c3990cba feat(config): parse effects.windows.shadows from Lua config
Add CfgEffectsWindowShadows struct (12 fields) and CfgEffectsWindows.shadows
member. Add wlr_scene_shadow *shadow field to Client struct for runtime
shadow node tracking. Update example/config.lua with full shadow config
block.

The config parser handles missing shadows table gracefully (all default).
2026-07-02 19:44:49 -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 2b603a8c87 update config 2026-07-02 05:01:53 -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 20e38fe682 build: fix debug target - add -Wno-pre-c23-compat for wlroots headers 2026-07-02 02:28:35 -04:00
huntedbytheirs 15f12be7e4 Add a cool ass logo :) 2026-07-02 02:25:06 -04:00
huntedbytheirs dfafc08fde refactor(peachmsg): migrate to nullptr, -std=c23; docs: update C references to C23 2026-07-02 02:09:00 -04:00
huntedbytheirs c529815d54 refactor: standardize headers to #pragma once, add [[nodiscard]]/[[maybe_unused]] annotations 2026-07-02 02:07:04 -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 1e09b182ee refactor: create include/common.h with shared types/macros, deduplicate across 7 files 2026-07-02 01:58:57 -04:00
huntedbytheirs 9581031dac build: migrate from -std=c11 to -std=c23, add TCC guard and -Wno-c23-extensions 2026-07-02 01:54:21 -04:00
huntedbytheirs b5ccb2621b Massive code refactor 2026-07-02 01:24:16 -04:00
huntedbytheirs c10722aa69 live laugh hate rust 2026-06-30 22:54:16 -04:00
huntedbytheirs 8da469afb4 Add a desktop file for sddm/ly/gdm/etc 2026-06-30 18:43:12 -04:00
huntedbytheirs c5f74d7108 Fix sloppy_focus 2026-06-30 02:07:19 -04:00
huntedbytheirs 6464becd5b Update 2026-06-30 01:45:19 -04:00
huntedbytheirs cee2192cdf Update the config 2026-06-30 00:50:55 -04:00
huntedbytheirs 5e5e787c41 Add floating window movement with keys. Add focus moving on floating 2026-06-30 00:40:39 -04:00
huntedbytheirs 02708b12c8 Add scratchpad
Added scratchpads
2026-06-29 16:35:52 -04:00
huntedbytheirs 71d4c14a62 Update README 2026-06-29 15:27:36 -04:00
huntedbytheirs 25a4f49bb5 Update README 2026-06-29 15:20:59 -04:00
huntedbytheirs 163b9e0a1c Remove citation 2026-06-29 15:19:29 -04:00
huntedbytheirs 193ee75223 Update config 2026-06-29 15:16:18 -04:00
huntedbytheirs 1ded834e33 Add live reloading to the rest of the config 2026-06-29 02:41:38 -04:00
huntedbytheirs 0ee686356f update smsg to peachwm 2026-06-29 02:27:03 -04:00
huntedbytheirs b903150de2 Fix a dumb makefile mistake. All packages use make release 2026-06-29 02:14:51 -04:00
huntedbytheirs 7721aeb945 Add automatic packaging, with make test 2026-06-29 02:04:34 -04:00
huntedbytheirs fb9add0778 Add a swaymsg-like IPC, and add some more docs. 2026-06-29 01:33:11 -04:00
huntedbytheirs 291e277f6e Change maintainer, and change licensing. 2026-06-29 00:49:15 -04:00
huntedbytheirs 220c2b8feb Update some docs 2026-06-29 00:41:52 -04:00
huntedbytheirs 781a4bfa92 Update README
Updated README to reflect last commit
2026-06-28 19:53:20 -04:00
huntedbytheirs 7fcd8577f3 Add input configuration live reloading
Made the input section of config.lua dynamically reloadable, no longer
requiring a hard restart.
2026-06-28 19:51:44 -04:00
huntedbytheirs 667dad864a Add workspace starting layouts 2026-06-28 19:41:21 -04:00
huntedbytheirs 6c3dc371e3 Add back other layouts
Added back master + monocle
2026-06-28 19:32:48 -04:00
huntedbytheirs f52d70f982 Update wlroots packae name 2026-06-28 19:21:23 -04:00
huntedbytheirs df5ebf8553 Change to arch 2026-06-28 19:19:59 -04:00
huntedbytheirs ef934ee44e Fix update makefile for ci/cd 2026-06-28 19:12:38 -04:00
huntedbytheirsandGitHub 8148c07f72 Update CI workflow for multi-branch support and tests
ci cd
2026-06-28 19:08:46 -04:00
huntedbytheirs 1ff9910ee3 Update readme 2026-06-28 18:45:47 -04:00
huntedbytheirs 94a5045a21 Update readme 2026-06-28 18:44:49 -04:00
huntedbytheirs 06749ba34f Add contributing 2026-06-28 18:44:24 -04:00
huntedbytheirs b7c1e74d19 reverse stupidity 2026-06-28 18:39:08 -04:00
huntedbytheirs 1024a222be Add features to Makefile
make release - compiles with clang, uses more aggressive compilation
flags for errors/warnings.
CC=tcc/gcc/clang make - lets you select your wanted compiler.
2026-06-28 18:03:05 -04:00
huntedbytheirs e8199f6d33 Fix name in ipc 2026-06-28 17:52:51 -04:00
huntedbytheirs 4a66649863 Fix recursive CFLAGS 2026-06-28 17:51:31 -04:00
huntedbytheirs 1fb2a05ddf Add compiler detection + optimizations
Added compiler detection:
TCC->Clang->GCC
Uses -O2 optimizations now
Uses -march=native by default, but by using
```make package```, it creates a distrobutable
binary instead.
2026-06-28 17:47:34 -04:00
huntedbytheirs f529f03315 Massive code cleanup
Cleaned up:
Makefile
config.mk/.h
nix files (by removing them for now)
Removed dwl likeness.
2026-06-28 17:39:02 -04:00
huntedbytheirs 763512a24f peachwm birth 2026-06-28 17:26:07 -04:00