Add man pages for both unl0kr and unl0kr.conf

Resolves #6
This commit is contained in:
undef 2023-04-01 23:00:55 +00:00
parent 50b6a23736
commit 9553081b89
3 changed files with 172 additions and 0 deletions

52
doc/unl0kr.1.scd Normal file
View file

@ -0,0 +1,52 @@
unl0kr(1) "unl0kr"
# NAME
UNL0KR
# SYNOPSIS
unl0kr [OPTION]
# DESCRIPTION
UNL0KR is a disk unlocker for the initramfs based on LVGL. By using LVGL and
rendering directly to the framebuffer it can work without relying on GPU
hardware acceleration. This makes for much more managable initramfs sizes.
Unl0kr utilises the CRYPTTAB_TRIED variable. Upon completion, the entered
password is printed to STDOUT. All other output happens on STDERR.
# OPTIONS
## Optional
*-C, --config-override*
Path to a config override file. Can be supplied multiple times. Config
files are merged in the following order:
- /etc/unl0kr.conf
- /etc/unl0kr.conf.d/\* (alphabetically)
- Override files (in supplied order)
*-g, --geometry=NxM[@X,Y]*
Force a display size of N horizontal times M vertical pixels, offset
horizontally by X pixels and vertically by Y pixels.
*-d --dpi=N*
Override the display's DPI value.
*-h, --help*
Print this message and exit.
*-v, --verbose*
Enable more detailed logging output on STDERR.
*-V, --version*
Print the unl0kr version and exit.
# EXAMPLES
*Decrypt /dev/sda1 to name "root"*
CRYPTTAB_SOURCE="/dev/sda1" CRYPTTAB_TRIED="0" unl0kr | cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue open "/dev/sda1" root -
# SEE ALSO
*unl0kr.conf*(5)
# AUTHORS
*Undef* <debian@undef.tools>

95
doc/unl0kr.conf.5.scd Normal file
View file

@ -0,0 +1,95 @@
unl0kr(5) "unl0kr"
# NAME
UNL0KR - configuration file
# DESCRIPTION
UNL0KR expects a configuration file with options in the following format, with
one option/value pair per line:
```
[section]
<option>=<value>
```
The default configuration file is at /etc/unl0kr.conf, UNL0KR will use this
configuration file if present along with overrides placed in
/etc/unl0kr.conf.d/ and those specified with the -C option. All config files
will be merged in the following order:
- /etc/unl0kr.conf
- /etc/unl0kr.conf.d/ (alphabetically)
- Override files (in supplied order)
# OPTIONS
## General
*animations* = <true|false>
Enable or disable animations. Useful for slower devices. Default: false.
*backend* = <fbdev|drm>
The rendering backend to use. Default: fbdev.
*timeout* = <value>
The time in seconds before unl0kr will consider the entry a failure
and shutdown. Setting timeout to 0 disables this feature. Default: 0.
## Keyboard
*autohide* = <true|false>
Whether to automatically hide the keyboard when a hardware keyboard
is detected on launch. Default: true.
*layout* = <us|de|fr|...>
The default layout to use. Can be changed from the UI at runtime.
The available options are defined by the available keyboards at build time.
Default: us.
*popovers* = <true|false>
Enable or disable key press popovers showing the selected key.
default: true.
## Textarea
*obscured* = <true|false>
Whether the password in the text entry box can be read. Selectable in
the UI at runtime. Default: true.
*bullet* = <value>
The character that will be used to obscure the password. Default: bullet.
## Theme
*default* = <breezy-light|breezy-dark|pmos-light|pmos-dark>
Selects the default theme on boot. Can be changed at runtime to the
alternative theme. Default: breezy-dark.
*alternative* = <breezy-light|breezy-dark|pmos-light|pmos-dark>
Selects the alternative theme which the user can then choose on boot.
Default: breezy-light.
## Input
*keyboard* = <true|false>
Enable or disable the use of hardware keyboards. Default: true
*pointer* = <true|false>
Enable or disable the use of a hardware mouse or other pointing device.
Default: true.
*touchscreen* = <true|false>
Enable or disable the use of the touchscreen.
Default: true.
## Quirks
*terminal_prevent_graphics_mode* = <true|false>
If true this avoids setting the terminal into graphics mode. Will show
terminal command prompt. Default: false.
*terminal_allow_keyboard_input* = <true|false>
If true this avoids turning off terminal keyboard input. This will show
your password on the terminal. Default: false.
# SEE ALSO
*unl0kr*(1)
# AUTHORS
*Undef* <debian@undef.tools>

View file

@ -45,6 +45,11 @@ squeek2lvgl_sources = [
'squeek2lvgl/sq2lv.c', 'squeek2lvgl/sq2lv.c',
] ]
man_files = [
'doc/unl0kr.1',
'doc/unl0kr.conf.5',
]
unl0kr_dependencies = [ unl0kr_dependencies = [
dependency('inih'), dependency('inih'),
dependency('libinput'), dependency('libinput'),
@ -71,3 +76,23 @@ executable(
dependencies: unl0kr_dependencies, dependencies: unl0kr_dependencies,
install: true install: true
) )
scdoc = dependency('scdoc')
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native : true)
sh = find_program('sh', native : true)
foreach file : man_files
filename = file + '.scd'
section = file.split('.')[-1]
topic = file.split('.' + section)[-2].split('/')[-1]
output = '@0@.@1@'.format(topic, section)
custom_target(
output,
input : filename,
output : output,
capture : true,
command : [sh, '-c', scdoc_prog.path() + ' < @INPUT@'],
install : true,
install_dir : get_option('mandir') / 'man' + section
)
endforeach