Client.lock
Lock this client's terminal.
Source and package
- Qualified name
-
libtmux::client:: Client:: lock - Module
- client
- Declared in
Client- Package
- libtmux
- Source
- crates/libtmux/src/client.rs
-
- Completion
- Returns a future that runs when awaited.signature · client.rs:430
- Errors
- Returns an error when tmux refuses the command. A later
Self::refresh()can returnError::ClientSuspendedor succeed, depending on whether that tmux release omits the locked client.doc comment · :427
Description
Runs the
lock-commandoption, which islock -npunless the server was told otherwise.crate::Session::lock()locks every client attached to one session andcrate::Server::lock_all()locks every client on the server; this locks exactly one.tmux marks a locked client with the flag it uses for a suspended one, so a locked client can leave
crate::Server::clients()the same way and returns to normal when itslock-commandexits. A server withlock-after-timeset reaches that state with nobody asking.Errors
Returns an error when tmux refuses the command. A later
Self::refresh()can returnError::ClientSuspendedor succeed, depending on whether that tmux release omits the locked client.
Recorded calls
source callsThe Rust reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls client.Client.lock.
tmux command
task materialThe tmux commands behind lock.
tmux C API
task materialThe C declarations in tmux that implement these commands.