From c742b58f51ab6c8bdc2149e127056f939b3d847a Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Mon, 25 Nov 2024 12:57:09 +0100 Subject: [PATCH] documentation: updated man page Using scdoc to make editing a bit more comfortable. --- Makefile | 8 +++- README.md | 2 + wvkbd.1 | 76 ------------------------------------ wvkbd.1.scd | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 77 deletions(-) delete mode 100644 wvkbd.1 create mode 100644 wvkbd.1.scd diff --git a/Makefile b/Makefile index 0c42909..bd27d9a 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,12 @@ HDRS = $(WAYLAND_HEADERS:.xml=-client-protocol.h) WAYLAND_SRC = $(HDRS:.h=.c) SOURCES = $(WVKBD_SOURCES) $(WAYLAND_SRC) +SCDOC=scdoc +DOCS = wvkbd.1 + OBJECTS = $(SOURCES:.c=.o) -all: ${BIN} +all: ${BIN} ${DOCS} config.h: cp config.def.h config.h @@ -45,6 +48,9 @@ clean: format: clang-format -i $(WVKBD_SOURCES) $(WVKBD_HEADERS) +%: %.scd + $(SCDOC) < $< > $@ + install: all mkdir -p ${DESTDIR}${PREFIX}/bin cp -f ${NAME}-${LAYOUT} ${DESTDIR}${PREFIX}/bin diff --git a/README.md b/README.md index 97a2a75..35cd85b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ You'll need the following developer packages - wayland-client - xkbcommon +You also need [scdoc](https://git.sr.ht/~sircmpwn/scdoc/) to generate the documentation. + Make any customizations you would like in `config.def.h` and run `make` The default set of layouts is called `mobintl` *(mobile international)*, which groups various layouts aimed at mobile devices diff --git a/wvkbd.1 b/wvkbd.1 deleted file mode 100644 index 90da3ff..0000000 --- a/wvkbd.1 +++ /dev/null @@ -1,76 +0,0 @@ -.TH "wvkbd" "1" "2022-03-12" -.P -.SH NAME -.P -wvkbd - on-screen keyboard for wlroots -.P -.SH SYNOPSIS -.P -wvkbd-mobintl [OPTION]... -.P -.SH DESCRIPTION -.P -wvkbd is an on-screen keyboard for wlroots that sucks less. -.P -.SH OPTIONS -.P -\fB-D\fR -.RS 4 -enable debug -.P -.RE -\fB-o\fR -.RS 4 -print pressed keys to standard output -.P -.RE -\fB-O\fR -.RS 4 -print intersected keys to standard output -.P -.RE -\fB-l\fR -.RS 4 -comma separated list of layers -.P -.RE -\fB--landscape-layers\fR -.RS 4 -comma separated list of layers used in landscape mode -.P -.RE -\fB-H\fR \fIPX\fR -.RS 4 -height in pixels -.P -.RE -\fB-L\fR \fIPX\fR -.RS 4 -landscape height in pixels -.P -.RE -\fB--fn\fR \fIFONT\fR -.RS 4 -set font (e.g: DejaVu Sans 20) -.P -.RE -\fB--hidden\fR -.RS 4 -start hidden (send SIGUSR2 to show, SIGUSR1 to hide, SIGRTMIN to toggle) -.P -.RE -\fB-v\fR, \fB--version\fR -.RS 4 -print version -.P -.RE -\fB-h\fR, \fB--help\fR -.RS 4 -show help -.P -.RE -.SH AUTHORS -.P -Created by John Sullivan , maintained by the Sxmo project in -collaboration with other open source contributors. For more information about wvkbd development, see - or . diff --git a/wvkbd.1.scd b/wvkbd.1.scd new file mode 100644 index 0000000..6bfaf29 --- /dev/null +++ b/wvkbd.1.scd @@ -0,0 +1,108 @@ +wvkbd(1) + +# NAME + +wvkbd - on-screen virtual keyboard for wayland compositors using wlroots + +# SYNOPSIS + +wvkbd-mobintl [OPTIONS]... + +*NOTE*: Your binary may have a different suffix depending on which layout you compiled. + +# DESCRIPTION + +This project aims to deliver a minimal but practically usable implementation of +a wlroots on-screen keyboard in legible C. This will _only_ be a keyboard, not +a feedback buzzer, led blinker, or anything that requires more than what's +needed to input text quickly. The end product should be a static codebase that +can be patched to add new features. + +## OPTIONS + +*-D* + enable debug mode. + +*-o* + print pressed keys to standard output. + +*-O* + print intersected keys to standard output. + +*-l* _layers_ + comma separated list of layers in vertical/portrait mode. + +*--landscape-layers* _layers_ + comma separated list of layers used in horizontal/landscape mode. + +*--list-layers* + prints a list of all available layers. + +*-H* _pixels_ + Height of the keyboard in pixels, for vertical/portrait mode. + +*-L* _pixels_ + Height of the keyboard in pixels, for horizontal/landscape mode + +*--fn* _font_ + set font and size (e.g. DejaVu Sans 20) + +*--hidden* + Start hidden (send SIGUSR2 to show). + +*--alpha* _int_ + Set alpha value (i.e. transparency) for all colors [0-255] + +*--bg* _rrggbb|aa_ + Set color of background + +*--fg* _rrggbb|aa_ + Set color of keys + +*--fg-sp* _rrggbb|aa_ + Set color of special keys + +*--press* _rrggbb|aa_ + Set color of pressed keys + +*--press-sp* _rrggbb|aa_ + Set color of pressed special keys + +*--swipe* _rrggbb|aa_ + Set color of swiped keys + +*--swipe-sp* _rrggbb|aa_ + Set color of swiped special keys + +*--text* _rrggbb|aa_ + Set color text on keys + +*--text-sp* _rrggbb|aa_ + Set color text on special keys + +*--version* + Print version information + +*-h*, *--help* + Print usage help + + +# SIGNALS + +You can send signals to wvkbd to hide/show it (e.g. using _kill_(1) with _-s_): + +*SIGUSR1* + Hide the keyboard. + +*SIGUSR2* + Show the keyboard + +*SIGRTMIN* + Toggle visibility + +# AUTHORS + +Created by John Sullivan , maintained by the Sxmo project + in collaboration with other open source contributors. For +more information about wvkbd development, see +or .