# lock-after-time

Source: https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/

> Lock the session (like the lock-session command) after number seconds of inactivity.

option tmux3.7c

Lock the session (like the lock-session command) after number seconds of inactivity.

* Scope

  session

* Type

  Number

* Default

  `0`

* Values

  0 to 2147483647 seconds

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.7c/manual/set-option/) `lock-after-time value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.7c/manual/show-options/) `lock-after-time`

## Description[#](https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/#description)

Lock the session (like the [`lock-session`](https://libtmux.org/en/tmux/3.7c/manual/lock-session/) command) after `number` seconds of inactivity. The default is not to lock (set to 0).

## Releases[#](https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/lock-after-time/) : present

## Source[#](https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/#source)

* Defined in

  [`options-table.c:709`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L709)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.7c/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.7c/manual/full/#options-lock-after-time)

## Used by[#](https://libtmux.org/en/tmux/3.7c/catalog/options/lock-after-time/#used-by)

Library documentation that names this option.

* Rust

  [`client.Client.lock`](https://libtmux.org/en/rs/latest/reference/client-client-lock/), [`options.generated.LOCK_AFTER_TIME`](https://libtmux.org/en/rs/latest/reference/options-generated-lock_after_time/)

* Go

  [`tmux.GlobalSessionScope.SetLockAfterTime`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-setlockaftertime/), [`tmux.Session.SetLockAfterTime`](https://libtmux.org/en/go/latest/reference/tmux-session-setlockaftertime/), [`tmux.SessionOptionValues.LockAfterTime`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-lockaftertime/)
