# LibTmux::Configuration::Options.set

- **Module:** LibTmux::Configuration
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Configuration.rakumod#L215
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-configuration-options-set/

```
method set(Str:D $name, $value, Int :$index --> Result:D)
```

Validate a typed value and set one scalar or explicitly indexed array member.

Validate a typed value and set one scalar or explicitly indexed array member.

## Parameters

- `$name` (`Str:D`)
- `$value`
- `$index?` (`Int`)

## tmux command

The tmux commands behind `set`.

- [`set-option`](/en/tmux/latest/manual/set-option/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_set_option_entry`](/en/tmux/latest/reference/c-variable-cmd_set_option_entry/) (attribute)
- [`cmd_set_option_exec`](/en/tmux/latest/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function)

## tmux options

Settings for the server, sessions, windows and panes, with their types, defaults and allowed values.

- [Options](/en/tmux/latest/catalog/options/) (option)

## In other ports

Set a server option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.set_option`](/en/py/latest/reference/libtmux-server-set_option/) (method) |
| Lua | [`libtmux.Server:set_option`](/en/lua/latest/reference/libtmux-server-set_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`server.Server.setOption`](/en/ts/latest/reference/server-server-setoption/) (method) |
| Rust | [`server.Server.set_option`](/en/rs/latest/reference/server-server-set_option/) (method) |
| Go | [`tmux.Server.SetOption`](/en/go/latest/reference/tmux-server-setoption/) (method) |
| Java | reached through `Server.options`, whose `Options` carries the write |
| C# | reached through `Server.Options`, whose `TmuxOptions` carries the write |
| C++ | [`libtmux::Server::set_server_option`](/en/cxx/latest/reference/libtmux-server-set_server_option/) (method) |
| Swift | [`Server.setOption(_:to:scope:)`](/en/swift/latest/reference/server-setoption(_-to-scope-)/) (method) |
| OCaml | [`Libtmux_unix.Client.set_option`](/en/ocaml/latest/reference/libtmux_unix-client-set_option/) (function) |
| Perl | [`LibTmux::Server::set_option`](/en/perl/latest/reference/libtmux-server-set_option/) (method). Pass scope => 'server' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Set a session option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.set_option`](/en/py/latest/reference/libtmux-session-set_option/) (method) |
| Lua | [`libtmux.Session:set_option`](/en/lua/latest/reference/libtmux-session-set_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`session.Session.setOption`](/en/ts/latest/reference/session-session-setoption/) (method) |
| Rust | [`session.Session.set_option`](/en/rs/latest/reference/session-session-set_option/) (method) |
| Go | [`tmux.Session.SetOption`](/en/go/latest/reference/tmux-session-setoption/) (method) |
| Java | reached through `Session.options`, whose `Options` carries the write |
| C# | reached through `Session.Options`, whose `TmuxOptions` carries the write |
| C++ | [`libtmux::Session::set_option`](/en/cxx/latest/reference/libtmux-session-set_option/) (method) |
| Swift | [`Server.setOption(_:to:scope:)`](/en/swift/latest/reference/server-setoption(_-to-scope-)/) (method) |
| OCaml | [`Libtmux_unix.Client.set_option`](/en/ocaml/latest/reference/libtmux_unix-client-set_option/) (function) |
| Perl | [`LibTmux::Server::set_option`](/en/perl/latest/reference/libtmux-server-set_option/) (method). Pass scope => 'session' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Set a window option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.set_option`](/en/py/latest/reference/libtmux-window-set_option/) (method) |
| Lua | [`libtmux.Window:set_option`](/en/lua/latest/reference/libtmux-window-set_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.setOption`](/en/ts/latest/reference/window-window-setoption/) (method) |
| Rust | [`window.Window.set_option`](/en/rs/latest/reference/window-window-set_option/) (method) |
| Go | [`tmux.Window.SetOption`](/en/go/latest/reference/tmux-window-setoption/) (method) |
| Java | reached through `Window.options`, whose `Options` carries the write |
| C# | reached through `Window.Options`, whose `TmuxOptions` carries the write |
| C++ | [`libtmux::Window::set_option`](/en/cxx/latest/reference/libtmux-window-set_option/) (method) |
| Swift | [`Server.setOption(_:to:scope:)`](/en/swift/latest/reference/server-setoption(_-to-scope-)/) (method) |
| OCaml | [`Libtmux_unix.Client.set_option`](/en/ocaml/latest/reference/libtmux_unix-client-set_option/) (function) |
| Perl | [`LibTmux::Server::set_option`](/en/perl/latest/reference/libtmux-server-set_option/) (method). Pass scope => 'window' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Set a pane option

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.set_option`](/en/py/latest/reference/libtmux-pane-set_option/) (method) |
| Lua | [`libtmux.Pane:set_option`](/en/lua/latest/reference/libtmux-pane-set_option/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.setOption`](/en/ts/latest/reference/pane-pane-setoption/) (method) |
| Rust | [`pane.Pane.set_option`](/en/rs/latest/reference/pane-pane-set_option/) (method) |
| Go | [`tmux.Pane.SetOption`](/en/go/latest/reference/tmux-pane-setoption/) (method) |
| Java | reached through `Pane.options`, whose `Options` carries the write |
| C# | reached through `Pane.Options`, whose `TmuxOptions` carries the write |
| C++ | [`libtmux::Pane::set_option`](/en/cxx/latest/reference/libtmux-pane-set_option/) (method) |
| Swift | [`Server.setOption(_:to:scope:)`](/en/swift/latest/reference/server-setoption(_-to-scope-)/) (method) |
| OCaml | [`Libtmux_unix.Client.set_option`](/en/ocaml/latest/reference/libtmux_unix-client-set_option/) (function) |
| Perl | [`LibTmux::Server::set_option`](/en/perl/latest/reference/libtmux-server-set_option/) (method). Pass scope => 'pane' and the explicit target ID where applicable; inherited and global reads are deliberate options. |

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
