# LibTmux::Model::PaneRef.new-floating

- **Module:** LibTmux::Model
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Model.rakumod#L298
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-paneref-new-floating/

```
method new-floating(Positive:D :$width!, Positive:D :$height!, Int :$x, Int :$y,
                        Bool :$modal = False, Bool :$select = False,
                        Str :$directory, Str :$shell-command, Bool :$empty = False,
                        Associative:D :$environment = Map.new --> PaneRef:D)
```

Create a floating pane. Modal input ownership requires the modal capability.

Create a floating pane. Modal input ownership requires the modal capability.

## Parameters

- `$width` (`Positive:D`)
- `$height` (`Positive:D`)
- `$x?` (`Int`)
- `$y?` (`Int`)
- `$modal?` (`Bool`)
- `$select?` (`Bool`)
- `$directory?` (`Str`)
- `$shell-command?` (`Str`)
- `$empty?` (`Bool`)
- `$environment?` (`Associative:D`)

## tmux command

The tmux commands behind `new-floating`.

- [`new-pane`](/en/tmux/latest/manual/new-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_new_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_new_pane_entry/) (attribute)
- [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function)

Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.

### Split a window

1. [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function)
2. references → [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function)
3. calls → [`window_add_pane`](/en/tmux/latest/reference/c-function-window_add_pane/) (function)
4. calls → [`window_pane_create`](/en/tmux/latest/reference/c-function-window-c-window_pane_create/) (function)
