Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Created August 17, 2022 10:59
Show Gist options
  • Save mortymacs/26449f523719e44140f345a0bab1904f to your computer and use it in GitHub Desktop.
Save mortymacs/26449f523719e44140f345a0bab1904f to your computer and use it in GitHub Desktop.
set tmux pane width in tmux and tmuxp

bash:

$ tmux set-window-option main-pane-width 20; tmux select-layout main-vertical

tmuxp:

session_name: DB
windows:
  - window_name: Prod
    layout: main-vertical
    focus: True
    options:
      main-pane-width: 30
    panes:session_name: DB
windows:
  - window_name: Prod
    layout: main-vertical
    focus: True
    options:
      main-pane-width: 30
    panes:
      - shell_command:
        - echo table
        - tmux select-layout main-vertical
      - shell_command:
        - echo sql
      - shell_command:
        - echo table
        - tmux select-layout main-vertical
      - shell_command:
        - echo sql

Resource: https://devel.tech/tips/n/tMuXrSz9/resize-tmux-main-panes-by-percentage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment