diff --git a/README.md b/README.md index 6f8a7de..e1b6f56 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ and published on [GitHub](https://github.com/Hjdskes/cage/releases). ## Building and running Cage You can build Cage with the [meson](https://mesonbuild.com/) build system. It -requires wayland, wlroots and xkbcommon to be installed. Note that Cage is -developed against the latest tag of wlroots, in order to not constantly chase -breaking changes as soon as they occur. +requires wayland, wlroots, and xkbcommon to be installed. Optionally, install +scdoc for manual pages. Note that Cage is developed against the latest tag of +wlroots, in order to not constantly chase breaking changes as soon as they +occur. Simply execute the following steps to build Cage: diff --git a/cage.1.scd b/cage.1.scd new file mode 100644 index 0000000..2ca43bc --- /dev/null +++ b/cage.1.scd @@ -0,0 +1,64 @@ +cage(1) + +# NAME + +cage - a Wayland kiosk compsitor + +# SYNOPSIS + +*cage* [-dhrv] [--] _application_ [application argument ...] + +# DESCRIPTION + +Cage runs a single, maximized application. Cage can run multiple applications, +but only a single one is visible at any point in time. User interaction and +activities outside the scope of the running application are prevented. + +# OPTIONS + +*-d* + Don't draw client side decorations when possible. + +*-h* + Show the help message. + +*-r* + Rotate the output 90 degrees clockwise. This can be specifed up to three + times, each resulting in an additional 90 degrees clockwise rotation. + +*-v* + Show the version number and exit. + +# ENVIRONMENT + +_DISPLAY_ + If compiled with Xwayland support, this will be set to the name of the + X display used for Xwayland. Otherwise, probe the X11 backend. + +_WAYLAND_DISPLAY_ + Specifies the name of the Wayland display that Cage is running on. + +_XCURSOR_PATH_ + Directory where cursors are located. + +_XCURSOR_SIZE_ + Specifies the configured cursor size. + +_XCURSOR_THEME_ + Specifies the configured cursor theme. + +_XKB_DEFAULT_RULES_, _XKB_DEFAULT_MODEL_, _XKB_DEFAULT_LAYOUT_, +_XKB_DEFAULT_VARIANT_, _XKB_DEFAULT_OPTIONS_ + Configures the xkb keyboard settings. See *xkeyboard-config*(7). + +# SEE ALSO + +*xkeyboard-config(7)* + +# BUGS + +Report bugs at https://github.com/Hjdskes/cage + +# AUTHORS + +Jente Hidskes diff --git a/meson.build b/meson.build index ce93de0..90bc400 100644 --- a/meson.build +++ b/meson.build @@ -93,6 +93,32 @@ conf_data = configuration_data() conf_data.set10('CAGE_HAS_XWAYLAND', have_xwayland) conf_data.set_quoted('CAGE_VERSION', version) +scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages')) +if scdoc.found() + scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) + sh = find_program('sh', native: true) + mandir = get_option('mandir') + man_files = [ + 'cage.1.scd' + ] + foreach filename : man_files + topic = filename.split('.')[-3].split('/')[-1] + section = filename.split('.')[-2] + output = '@0@.@1@'.format(topic, section) + + custom_target( + output, + input: filename, + output: output, + command: [ + sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) + ], + install: true, + install_dir: '@0@/man@1@'.format(mandir, section) + ) + endforeach +endif + cage_sources = [ 'cage.c', 'idle_inhibit_v1.c', diff --git a/meson_options.txt b/meson_options.txt index 87763ff..a28e2cf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ +option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') option('xwayland', type: 'boolean', value: 'false', description: 'Enable support for X11 applications')