# LibTmux::Layout.decode-layout

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Layout.rakumod#L282
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-layout-decode-layout/

```
sub decode-layout(Str:D $raw, *%options --> Layout:D)

sub decode-layout(Blob:D $raw, Str:D :$profile!,
                        Str :$modal-pane-id,
                        Positive:D :$max-bytes = 1024 * 1024,
                        Positive:D :$max-depth = 64,
                        Positive:D :$max-nodes = 10000 --> Layout:D)
```

Decode a declared dialect. Unknown versions retain bytes without a guessed tree.

Decode a declared dialect. Unknown versions retain bytes without a guessed tree.

## Parameters

- `$raw` (`Str:D`) (for `decode-layout($raw, %options)`)
- `%options` (for `decode-layout($raw, %options)`)
- `$raw` (`Blob:D`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
- `$profile` (`Str:D`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
- `$modal-pane-id?` (`Str`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
- `$max-bytes?` (`Positive:D`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
- `$max-depth?` (`Positive:D`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
- `$max-nodes?` (`Positive:D`) (for `decode-layout($raw, $profile, $modal-pane-id, $max-bytes, $max-depth, $max-nodes)`)
