Commits


LICENSE.md, README.md, bxnotify.1: Add user-facing documentation. - Adopt ISC licnese. - Create README.md detailing build, configuration, and usage. - Create bxnotify.c manual page.


bxnotify.c, config.def.h: Name the concurrent notification cap. - Define MAX_STACK in config.def.h, replacing the previously magic-numbered [100] array dimensions and loop bounds in get_and_register_stack_y() and unregister_position(). - Add cfg_max_stack as a runtime configuration variable, following the same pattern as cfg_stack_gap and other tunable defaults. - This makes the cap on concurrent notifications explicit, configurable from a single location, and consistent with the suite's convention of promoting tunables into the config layer.


bxnotify.c: Correct typo in headers and edit calc_layout() function. - Rename include to <getopt.h> to match the actual getopt(3) declaration - Correct calc_layout so that when input contains no breakable space, hard-break is at the largest fitting prefix - Leave cfg_padding on the right for visual appeal - Add NULL checks on realloc() so memory exhaustion routes through die() and cleanup() rather than crashing - Restructure the loop so the workd-break and hard-break paths are explicit and symmetric.


bxnotify.c: Eliminate variable shadowing in xerror handler. - Rename the local 'dpy' parameter in the xerror() function to 'd'. to prevent the local parameter from shadowing the global 'dpy' Display pointer. - Update the chained error handler call to use the new 'd' parameter.


bxnotify.c: Document full option set and ensure portable getopt declaration. - Include <getopt.h> to provide an explicit, portable declaration for the getopt(3) function. This aligns with the code correctness and portability goals across ARM64, AMD64, and RISC-V architectures. - Update the usage error message in the getopt default case to include the [-C border] option, which was previously omitted from the help text despite being a valid flag.


bxnotify.c: Refactor error and exit handling for suite consistency. - Update the cleanup() function signature to accept an integer error code (int err), allowing the function to terminate the process via exit() based on runtime success or failure. - Modify die() to call cleanup(1) instead of exit(1), ensuring all resources (X11 connections, text buffers, registry positions) are properly freed even when terminating due to an error. - Update the successful exit path in main() to call cleanup(0). - Remove the explicit 'return 0' from main(), as cleanup() now handles process termination directly. - Ensure the forward declaration for cleanup() matches the updated implementation to prevent C11 type-mismatch warnings.


bxnotify.c, config.def.h: Move stacking gap offset to config.def.h. - Define STACK_GAP as a configurable constant in config.def.h, replacing the hardcoded 16-pixel offset. - Update registration logic to reference cfg_stack_gap, maintaining consistency with existing runtime configuration patterns and improving overall maintainability.


bxnotify.c, config.def.h, Makefile: Edit comment heading.


config.def.h: Update default values.


bxnotify.c: Implement command-line configuration logic. - Convert hardcoded config.h macros into mutable global variables for runtime configuration. - Implement CLI option parsing using getopt(3) to support custom duration (-d), font (-f), foreground color (-F), background color (-B), border color (-C), and alignment (-a) at launch. - Update setup() and draw() to utilize runtime configuration variables instead of compile-time macros. - Retain config.def.h as the architectural source for default values.


bxnotify.c: Implement registry-aware window dismissal. - Enable intuitive dismissal of notifications using Mod4+q, respecting the vertical stack order. - Implement get_oldest_pid() to identify the top-most active instance and ensure ordered dismissal. - Introduce SIGUSR1 delegation to allow concurrent instances to communicate; non-oldest instances signal the oldest to dismiss. - Perform a global passive grab (XGrabKey on Root) to capture dismissal commands without requiring window focus. - Install a custom X error handler to gracefully ignore BadAccess errors caused by shared Root grabs across multiple instances. - Update event loop to handle KeyPress events, delegating the process termination to the identified oldest PID.


bxnotify.c: Implement vertical stacking - Enable concurrent notifications to stack vertically without overlapping or race conditions by introducing a locked registry file. - Add registry system: Use ~/.local/tmp/bxnotify.reg to coordinate Y positions between concurrent instances. - Prevent race conditions by implementing flock(2) (exclusive lock) to atomically read, calculate, and write window positions. - Use kill(pid, 0) to garbage-collect stale PIDs of crashed or closed notifications from the registry for a self-cleaing state. - Apply XSetClassHint so the window is properly identified as “bxnotify”. - Refactor setup() to accept y as an argument calculated before window mapping, removing hardcoded WIN_Y positioning.


bxnotify.c: Implement dynamic window geometry and text word-wrapping. - Refractor input handling and rendering logic to support multi- line input and automatic window resizing. - Add TextBlock struct replacing fixec 1024-char buffer with dynamic heap allocation for flexible text processing. - Implement calc_layout() as a layout pass that calculates necessary window height and performs word-wrapping based on WIN_WIDTH before window is mapped. - Add measure_text() helper. - Split out display and font setup into init_display() to satisfy dependencies for early layout calculation. - Updated draw() loop for rendiering to iterate through wrapped lines applying alignment and vertical offsets dynamically. - Improved cleanup() adding heap-memory management for TextBlock lines to prevent memory leaks.


bxnotify.c, config.def.h: Initialize lightweight notification management. - Implement basic windowing with Xft and custom border rendering. - Add signal handling for lifecycle management (SIGUSR1). - Implement stdin reading for flexible shell integration. - Add auto-layout height and configurable alignment. - Incorporate posix-compliant sleep and error reporting.


.gitignore: Add config.h to ignore list.


config.def.h: Define interface and parameter names. - To be referenced in bxnotify.c and CLI parser.


bxnotify.c: Create initial scaffold for development. - Set C headers - Set global variables - Set forward function declarations - Place main() function first - Name utility, setup and teardown, and operational functions


Makefile: Edit for usability and correctness. - Add std=c11 and -pedantic to CFLAGS - Change LDFLAGS and LIBS to LDLIBS - Add all target


.gitignore: created file.


Initial import bxnotify project.