swaylock(1) General Commands Manual swaylock(1)

# [NAME](#NAME)

swaylock - Screen locker for Wayland

# [SYNOPSIS](#SYNOPSIS)

*swaylock* \[options...]

Locks your Wayland session.

# [OPTIONS](#OPTIONS)

**-C, --config** &lt;path&gt;

The config file to use. By default, the following paths are checked: *$HOME/.swaylock/config*, *$XDG\_CONFIG\_HOME/swaylock/config*, and *SYSCONFDIR/swaylock/config*. All flags aside from this one are valid options in the configuration file using the format *long-option=value*. For options such as *ignore-empty-password*, just supply the *long-option*. All leading dashes should be omitted and the equals sign is required for flags that take an argument. For example:

```
image=/usr/share/backgrounds/sway/Sway_Wallpaper_Blue_768x1024.png
scaling=center
show-failed-attempts
ring-color=#ff00ff
```

**-d, --debug**

Enable debugging output.

**-e, --ignore-empty-password**

When an empty password is provided, do not validate it.

**-F, --show-failed-attempts**

Show current count of failed authentication attempts.

**-f, --daemonize**

Detach from the controlling terminal after locking.

Note: this is the default behavior of i3lock.

**-R, --ready-fd** &lt;fd&gt;

File descriptor to send readiness notifications to.

When the session has been locked, a single newline is written to the FD. At this point, the compositor guarantees that no security sensitive content is visible on-screen.

**-h, --help**

Show help message and quit.

**-v, --version**

Show the version number and quit.

# [APPEARANCE](#APPEARANCE)

**-u, --no-unlock-indicator**

Disable the unlock indicator.

**-i, --image** \[\[&lt;output&gt;]:]&lt;path&gt;

Display the given image, optionally only on the given output. Use -c to set a background color. If the path potentially contains a ':', prefix it with another ':' to prevent interpreting part of it as &lt;output&gt;.

**-k, --show-keyboard-layout**

Display the current xkb layout while typing.

**-K, --hide-keyboard-layout**

Force hiding the current xkb layout while typing, even if more than one layout is configured or the show-keyboard-layout option is set.

**-L, --disable-caps-lock-text**

Disable the Caps Lock text.

**-l, --indicator-caps-lock**

Show the current Caps Lock state also on the indicator.

**-s, --scaling**

Image scaling mode: *stretch*, *fill*, *fit*, *center*, *tile*, *solid\_color*. Use *solid\_color* to display only the background color, even if a background image is specified.

**-t, --tiling**

Same as --scaling=tile.

**-c, --color** &lt;rrggbb\[aa]&gt;

Turn the screen into the given color instead of light gray. If -i is used, this sets the background of the image to the given color. Defaults to light gray (A3A3A3).

**--bs-hl-color** &lt;rrggbb\[aa]&gt;

Sets the color of backspace highlight segments.

**--caps-lock-bs-hl-color** &lt;rrggbb\[aa]&gt;

Sets the color of backspace highlight segments when Caps Lock is active.

**--caps-lock-key-hl-color** &lt;rrggbb\[aa]&gt;

Sets the color of the key press highlight segments when Caps Lock is active.

**--font** &lt;font&gt;

Sets the font of the text.

**--font-size** &lt;size&gt;

Sets a fixed font size for the indicator text.

**--indicator-idle-visible**

Sets the indicator to show even if idle.

**--indicator-radius** &lt;radius&gt;

Sets the indicator radius. The default value is 50.

**--indicator-thickness** &lt;thickness&gt;

Sets the indicator thickness. The default value is 10.

**--indicator-x-position** &lt;x&gt;

Sets the horizontal position of the indicator.

**--indicator-y-position** &lt;y&gt;

Sets the vertical position of the indicator.

**--inside-color** &lt;rrggbb\[aa]&gt;

Sets the color of the inside of the indicator.

**--inside-clear-color** &lt;rrggbb\[aa]&gt;

Sets the color of the inside of the indicator when cleared.

**--inside-caps-lock-color** &lt;rrggbb\[aa]&gt;

Sets the color of the inside of the indicator when Caps Lock is active.

**--inside-ver-color** &lt;rrggbb\[aa]&gt;

Sets the color of the inside of the indicator when verifying.

**--inside-wrong-color** &lt;rrggbb\[aa]&gt;

Sets the color of the inside of the indicator when invalid.

**--key-hl-color** &lt;rrggbb\[aa]&gt;

Sets the color of the key press highlight segments.

**--layout-bg-color** &lt;rrggbb\[aa]&gt;

Sets the background color of the box containing the layout text.

**--layout-border-color** &lt;rrggbb\[aa]&gt;

Sets the color of the border of the box containing the layout text.

**--layout-text-color** &lt;rrggbb\[aa]&gt;

Sets the color of the layout text.

**--line-color** &lt;rrggbb\[aa]&gt;

Sets the color of the line between the inside and ring.

**--line-clear-color** &lt;rrggbb\[aa]&gt;

Sets the color of the line between the inside and ring when cleared.

**--line-caps-lock-color** &lt;rrggbb\[aa]&gt;

Sets the color of the line between the inside and ring when Caps Lock is active.

**--line-ver-color** &lt;rrggbb\[aa]&gt;

Sets the color of the line between the inside and ring when verifying.

**--line-wrong-color** &lt;rrggbb\[aa]&gt;

Sets the color of the line between the inside and ring when invalid.

**-n, --line-uses-inside**

Use the inside color for the line between the inside and ring.

**-r, --line-uses-ring**

Use the ring color for the line between the inside and ring.

**--ring-color** &lt;rrggbb\[aa]&gt;

Sets the color of the ring of the indicator when typing or idle.

**--ring-clear-color** &lt;rrggbb\[aa]&gt;

Sets the color of the ring of the indicator when cleared.

**--ring-caps-lock-color** &lt;rrggbb\[aa]&gt;

Sets the color of the ring of the indicator when Caps Lock is active.

**--ring-ver-color** &lt;rrggbb\[aa]&gt;

Sets the color of the ring of the indicator when verifying.

**--ring-wrong-color** &lt;rrggbb\[aa]&gt;

Sets the color of the ring of the indicator when invalid.

**--separator-color** &lt;rrggbb\[aa]&gt;

Sets the color of the lines that separate highlight segments.

**--text-color** &lt;rrggbb\[aa]&gt;

Sets the color of the text.

**--text-clear-color** &lt;rrggbb\[aa]&gt;

Sets the color of the text when cleared.

**--text-caps-lock-color** &lt;rrggbb\[aa]&gt;

Sets the color of the text when Caps Lock is active.

**--text-ver-color** &lt;rrggbb\[aa]&gt;

Sets the color of the text when verifying.

**--text-wrong-color** &lt;rrggbb\[aa]&gt;

Sets the color of the text when invalid.

# [SIGNALS](#SIGNALS)

**SIGUSR1**

Unlock the screen and exit.

# [AUTHORS](#AUTHORS)

Maintained by Drew DeVault &lt;sir@cmpwn.com&gt;, who is assisted by other open source contributors. For more information about swaylock development, see https://github.com/swaywm/swaylock.

2026-11-03

---

Document: swaylock(1) from swaylock 1.8.6-r6 (Chainguard OS)
Source: https://github.com/swaywm/swaylock
