···55- `/etc/nlock/nlock.toml`, system-wide configuration
66- `~/.config/nlock/nlock.toml`, user configuration
7788-Configuration files are TOML formatted. The following example demonstrates all
99-the available configuration options (this might not be up-to-date).
1010-1111-```toml
1212-# The values defined in this example are the defaults used by nlock
1313-1414-# General configuration options
1515-[general]
1616-allowEmptyPassword = false # allow a blank password to be validated
1717-hideCursor = true # hide the mouse cursor
1818-backgroundType = "color" # background type "color", or "image"
1919-2020-# Colors section configures, well, colors.
2121-[colors]
2222-# Colors are in either #RRGGBBAA or #RRGGBB format,
2323-# both #RRGGBBAA in this case.
2424-background = "#000000FF" # background color, same as "#000000"
2525-text = "#FFFFFFFF" # text color, same as "#FFFFFF"
2626-inputBackground = "#000000FF" # input box background color
2727-inputBorder = "#000000FF" # input box border color
2828-frameBorderIdle = "#00000000" # frame border idle color
2929-frameBorderSuccess = "#00000000" # frame border success color
3030-frameBorderFail = "#FF0000FF" # frame border error color
3131-3232-# Font section configures text display.
3333-[font]
3434-size = 72.0 # font size, in points
3535-useDpiScaling = false # whether to scale font size based on output DPI
3636-3737-# Font family uses Cairo's toy font API, generally, standard CSS names
3838-# like `monospace`, `serif`, etc. should work. Leaving it empty (or invalid)
3939-# will select the system default.
4040-family = ""
4141-4242-slant = "normal" # font slant, either "normal", "italic", or "oblique"
4343-weight = "normal" # font weight, either "normal", or "bold"
4444-4545-# Input section configures the password input box.
4646-[input]
4747-maskChar = "*" # character displayed in place of password characters
4848-width = 0.5 # width of the input box, relative to display width
4949-paddingX = 0.05 # input box horizontal padding, relative to display width
5050-paddingY = 0.05 # input box vertical padding, relative to display height
5151-radius = 0.0 # radius of input box corners, relative to total box height
5252-border = 0.0 # width of input box border, absolute, typically pixels
5353-5454-visible = "always" # input box visibility, "never", "content", "always"
5555-fitToContent = false # resize input box to fit password, up to `width`
5656-5757-# Frame section configures everything around the input box.
5858-[frame]
5959-border = 25.0 # width of frame border, absolute units, typically pixels
6060-radius = 0.0 # radius of frame border, absolute units, typically pixels
6161-6262-[image]
6363-path = "" # full path to background image, does not support shell expansions
6464-scale = "fill" # background image scaling, "center", "fit", "fill", "stretch", "tile"
6565-```
6666-6767-Further configuration values are likely to be added in the future. Hopefully,
6868-the above example will be updated when they are.
88+Configuration files are TOML formatted. The example configuration file can
99+be found [here](../examples/default.toml) demonstrating all available
1010+configuration options.
69117012If you specify invalid values in a configuration file, nlock will either show
7113an error, or continue with defaults if possible.
+5
examples/README.md
···11+# Examples
22+33+This directory contains the following example configurations for nlock:
44+55+- `default.toml`, the default configuration values used by nlock
+53
examples/default.toml
···11+# The values defined in this example are the defaults used by nlock
22+33+# General configuration options
44+[general]
55+allowEmptyPassword = false # allow a blank password to be validated
66+hideCursor = true # hide the mouse cursor
77+backgroundType = "color" # background type "color", or "image"
88+99+# Colors section configures, well, colors.
1010+[colors]
1111+# Colors are in either #RRGGBBAA or #RRGGBB format,
1212+# both #RRGGBBAA in this case.
1313+background = "#000000FF" # background color, same as "#000000"
1414+text = "#FFFFFFFF" # text color, same as "#FFFFFF"
1515+inputBackground = "#000000FF" # input box background color
1616+inputBorder = "#000000FF" # input box border color
1717+frameBorderIdle = "#00000000" # frame border idle color
1818+frameBorderSuccess = "#00000000" # frame border success color
1919+frameBorderFail = "#FF0000FF" # frame border error color
2020+2121+# Font section configures text display.
2222+[font]
2323+size = 72.0 # font size, in points
2424+useDpiScaling = false # whether to scale font size based on output DPI
2525+2626+# Font family uses Cairo's toy font API, generally, standard CSS names
2727+# like `monospace`, `serif`, etc. should work. Leaving it empty (or invalid)
2828+# will select the system default.
2929+family = ""
3030+3131+slant = "normal" # font slant, either "normal", "italic", or "oblique"
3232+weight = "normal" # font weight, either "normal", or "bold"
3333+3434+# Input section configures the password input box.
3535+[input]
3636+maskChar = "*" # character displayed in place of password characters
3737+width = 0.5 # width of the input box, relative to display width
3838+paddingX = 0.05 # input box horizontal padding, relative to display width
3939+paddingY = 0.05 # input box vertical padding, relative to display height
4040+radius = 0.0 # radius of input box corners, relative to total box height
4141+border = 0.0 # width of input box border, absolute, typically pixels
4242+4343+visible = "always" # input box visibility, "never", "content", "always"
4444+fitToContent = false # resize input box to fit password, up to `width`
4545+4646+# Frame section configures everything around the input box.
4747+[frame]
4848+border = 25.0 # width of frame border, absolute units, typically pixels
4949+radius = 0.0 # radius of frame border, absolute units, typically pixels
5050+5151+[image]
5252+path = "" # full path to background image, does not support shell expansions
5353+scale = "fill" # background image scaling, "center", "fit", "fill", "stretch", "tile"