tmux.ts - v0.1.3
    Preparing search index...

    Variable swapPaneConst

    swapPane: (
        options?: {
            detached?: boolean;
            down?: boolean;
            keepZoomed?: boolean;
            sourcePane?: string;
            targetPane?: string;
            up?: boolean;
        },
    ) => Effect<
        string,
        TmuxCommandOptionsError
        | TmuxProcessRunError,
        TmuxProcess,
    > = ...

    Swap two panes (tmux swap-pane).

    Type Declaration

      • (
            options?: {
                detached?: boolean;
                down?: boolean;
                keepZoomed?: boolean;
                sourcePane?: string;
                targetPane?: string;
                up?: boolean;
            },
        ): Effect<
            string,
            TmuxCommandOptionsError
            | TmuxProcessRunError,
            TmuxProcess,
        >
      • Parameters

        • Optionaloptions: {
              detached?: boolean;
              down?: boolean;
              keepZoomed?: boolean;
              sourcePane?: string;
              targetPane?: string;
              up?: boolean;
          }
          • Optional Readonlydetached?: boolean

            Do not change the active pane (-d).

          • Optional Readonlydown?: boolean

            Swap with the next pane when no source is given (-D).

          • Optional ReadonlykeepZoomed?: boolean

            Keep the window zoomed if it was zoomed (-Z).

          • Optional ReadonlysourcePane?: string

            Source pane; defaults to the marked pane, else current (-s).

          • Optional ReadonlytargetPane?: string

            Destination pane to swap with (-t).

          • Optional Readonlyup?: boolean

            Swap with the previous pane when no source is given (-U).

        Returns Effect<string, TmuxCommandOptionsError | TmuxProcessRunError, TmuxProcess>

        An empty string on success.

    await tmux.swapPane({ sourcePane: "%0", targetPane: "%1" });

    await tmux.swapPane({ down: true, detached: true, targetPane: "work:1" });