labwc/scripts
Johan Malm c63d35c942 Add labnag
Based on swaynag (https://github.com/swaywm/sway/tree/master/swaynag)

Copied at commit:
03483ff370

Contains the following modifiations:

- Some functional changes including:
  - Disable exclusive-zone by default (Written-by: @Consolatis) and add
    command line option -x|--exclusive-zone
  - Add close timeout (Written-by: @Consolatis) and -t|--timeout option
  - Use index of button (from right-to-left) for exit code
  - Disable reading from config file and remove associated --type option
- Refactoring including:
  - Use wlr_log() instead of the log.{c,h} functions
  - Use wl_list instead of sway's list.c implementation
  - In the pango wrapper functions, use glib's g_strdup_vprintf() rather
    than the original stringop.c functions
- Align with labwc coding style to pass checkpatch.pl
- Re-licenced from MIT to GPL-2.0, and add Copyright notices for original
  authors

v2

- Remove option -s|--dismiss-button and the default "X" button. To get
  such a button, "-Z X :"
- Remove options -b and -z because there is no requirement to run
  in a terminal.
- Remove *-no-terminal from options --button and --button-dismiss because
  commands are now always run directly without a terminal.

v3

- Allow -B/-Z options without action-argument
- Invert button order of -B/-Z so that `labnag -m foo -Z x -Z y -Z z`
  results in three buttons with "x" furthest to the left, and "z" on the
  right (rather than the other way around).
- Use signalfd() to prevent race conditions on SIGTERM

v4

- Limit number of stdin lines to 200 to avoid hogging CPU

Co-Authored-by: tokyo4j
2025-08-09 10:44:03 +01:00
..
ci CI: verify early exit on missing fonts 2025-05-09 20:20:54 +01:00
helper ci: include scripts/find-banned.sh 2023-12-29 11:47:55 +01:00
.gitignore Add scripts/find-banned.sh 2023-07-06 18:04:55 +01:00
asan_leak_suppressions Add lsan.supp 2024-11-26 21:29:09 +00:00
check Add labnag 2025-08-09 10:44:03 +01:00
checkpatch.pl common/xml: add helpers to parse rc.xml 2025-07-30 20:36:27 +01:00
find-banned.sh CI: add atof() to banned list 2024-05-13 11:06:04 +02:00
README.md checkpatch: add scripts/check for batch processing 2022-11-03 19:20:23 +00:00
rip.c Add scripts/rip.c 2025-02-04 06:37:00 +00:00
run-with-asan.sh Add lsan.supp 2024-11-26 21:29:09 +00:00
wl_compcheck.py scripts: add wl_compcheck.py 2024-12-10 21:05:31 +00:00

These scripts are intended to be run from the project top-level directory like this: scripts/foo.sh

  • scripts/check: wrapper to check all files in src/ and include/

  • scripts/checkpatch.pl: Quick hack on the Linux kernel checkpatch.pl to lint C files written according to the labwc coding style. Run like this: ./checkpatch.pl --no-tree --terse --strict --file <file>