zellij/docs/MANPAGE.md
a-kenji 79a4f76e93 Add more Functionality to Unbind
The default keybinds can be unbound either for a specific mode, or for every mode.
It supports either a list of `keybinds`, or a bool indicating that every keybind
should be unbound:

```
keybinds:
    unbind: true
```
Will unbind every default binding.

```
keybinds:
    unbind: [ Ctrl: 'p']
```
Will unbind every default `^P` binding for each mode.
```
keybinds:
    normal:
        - unbind: true
```
Will unbind every default keybind for the `normal` mode.
```
keybinds:
    normal:
        - unbind: [ Alt: 'n', Ctrl: 'g']
```
Will unbind every default keybind for `n` and `^g` for the `normal` mode.
2021-05-07 10:51:35 +02:00

6.5 KiB

NAME

zellij - run zellij

DESCRIPTION

Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and screen), but this is merely its infrastructure layer.

Zellij includes a layout system, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly.

OPTIONS

Run zellij --help to see available flags and subcommamds.

CONFIGURATION

Zellij looks for configuration file in the following order:

  1. the file provided with --config
  2. under the path provided in ZELLIJ_CONFIG environment variable
  3. the default location (see FILES section)

LAYOUTS

Layouts are yaml files which Zellij can load on startup when --layout flag is provided.

For example a file like this:

---
direction: Vertical
parts:
    - direction: Horizontal
      split_size:
        Percent: 50
      parts:
        - direction: Vertical
          split_size:
            Percent: 50
        - direction: Vertical
          split_size:
            Percent: 50
    - direction: Horizontal
      split_size:
        Percent: 50

will tell Zellij to create this layout:

┌─────┬─────┐
│     │     │
├─────┤     │
│     │     │
└─────┴─────┘

CREATING LAYOUTS

A layout file is a nested tree structure. Each node describes either a pane (leaf), or a space in which its parts (children) will be created.

Each node has following fields:

  • direction: <Horizontal / Vertical> - node's children will be created by a split in given direction.
  • split_size: - this indicates either a percentage of the node's parent's space or a fixed size of columns/rows from its parent's space.
    • Percent: <1-100>
    • Fixed: <lines_number/columns_number>
  • plugin: /path/to/plugin.wasm - optional path to a compiled Zellij plugin. If indicated loads a plugin into the created space. For more information see PLUGINS section.

KEYBINDINGS

Zellij comes with a default set of keybindings which aims to fit as many users as possible but that behaviour can be overidden or modified in user configuration files. The information about bindings is available in the keybinds section of configuration. For example, to introduce a keybinding that will create a new tab and go to tab 1 after pressing 'c' one can write:

keybinds:
    normal:
        - action: [ NewTab, GoToTab: 1,]
          key: [ Char: 'c',]

where "normal" stands for a mode name (see MODES section), "action" part specifies the actions to be executed by Zellij (see ACTIONS section) and "key" is used to list keys or key combinations bound to given actions (see KEYS).

The default keybinds can be unbound either for a specific mode, or for every mode. It supports either a list of keybinds, or a bool indicating that every keybind should be unbound:

keybinds:
    unbind: true

Will unbind every default binding.

keybinds:
    unbind: [ Ctrl: 'p']

Will unbind every default ^P binding for each mode.

keybinds:
    normal:
        - unbind: true

Will unbind every default keybind for the normal mode.

keybinds:
    normal:
        - unbind: [ Alt: 'n', Ctrl: 'g']

Will unbind every default keybind for n and ^g for the normal mode.

ACTIONS

  • Quit - quits Zellij
  • SwitchToMode: <InputMode> - switches to the specified input mode. See MODES section for possible values.
  • Resize: <Direction> - resizes focused pane in the specified direction (one of: Left, Right, Up, Down).
  • FocusNextPane - switches focus to the next pane to the right or below if on screen edge.
  • FocusPreviousPane - switches focus to the next pane to the left or above if on screen edge.
  • SwitchFocus - left for legacy support. Switches focus to a pane with the next ID.
  • MoveFocus: <Direction> - moves focus in the specified direction (Left, Right, Up, Down).
  • ScrollUp - scrolls up 1 line in the focused pane.
  • ScrollDown - scrolls down 1 line in the focused pane.
  • ToggleFocusFullscreen - toggles between fullscreen focus pane and normal layout.
  • NewPane: <Direction> - opens a new pane in the specified direction (Left, Right, Up, Down) relative to focus.
  • CloseFocus - closes focused pane.
  • NewTab - creates a new tab.
  • GoToNextTab - goes to the next tab.
  • GoToPreviousTab - goes to previous tab.
  • CloseTab - closes current tab.
  • GoToTab: <Index> - goes to the tab with the specified index number.

KEYS

  • Char: <character> - a single character with no modifier.
  • Alt: <character> - a single character with Alt key as modifier.
  • Ctrl: <character> - a single character with Ctrl key as modifier.
  • F: <1-12> - one of F keys (usually at the top of the keyboard).
  • Backspace
  • Left / Right / Up / Down - arrow keys on the keyboard.
  • Home
  • End
  • PageUp / PageDown
  • BackTab - a backward Tab key.
  • Delete
  • Insert
  • Esc

MODES

  • normal - the default startup mode of Zellij. Provides the ability to switch to different modes, as well as some quick navigation shortcuts.
  • locked - disables all keybindings except the one that would switch the mode to normal (ctrl-g by default). Useful when Zellij's keybindings conflict with those of a chosen terminal app.
  • pane - includes instructions that manipulate the panes (adding new panes, moving, closing).
  • tab - includes instructions that manipulate the tabs (adding new tabs, moving, closing).
  • resize - allows resizing of the focused pane.
  • scroll - allows scrolling within the focused pane.
  • RenameTab - is a "hidden" mode that can be passed to SwitchToMode action. It will trigger renaming of a tab.

PLUGINS

Zellij has a plugin system based on WebAssembly. Any language that can run on WASI can be used to develop a plugin. To load a plugin include it in a layout file. Zellij comes with default plugins included: status-bar, strider, tab-bar.

FILES

Default user configuration file location:

  • Linux: /home/alice/.config/zellij
  • macOS: /Users/Alice/Library/Application Support/com.Zellij-Contributors.zellij

ENVIRONMENT

ZELLIJ_CONFIG Path of Zellij config to load.

NOTES

The manpage is meant to provide concise offline reference. For more detailed instructions please visit:

https://zellij.dev/documentation