summaryrefslogtreecommitdiffstats
path: root/docs/MANPAGE.md
blob: 8f24bbc5bbbc21ad5e706c42f64f33c8ba86c36e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
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.

To list currently running sessions run: `zellij list-sessions`
To attach to a currently running session run: `zellij attach [session-name]`

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_FILE* environment variable
3. the default location (see FILES section)
4. the system location

Run `zellij setup --check` in order to see possible issues with the
configuration.

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 overridden 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).
* __DumpScreen: <File\>__ - dumps the screen in the specified file.
* __ScrollUp__ - scrolls up 1 line in the focused pane.
* __ScrollDown__ - scrolls down 1 line in the focused pane.
* __PageScrollUp__ - scrolls up 1 page in the focused pane.
* __PageScrollDown__ - scrolls down 1 page 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.
* __Detach__ - detach session and exit.
* __ToggleActiveSyncTab__ - toggle between sending text commands to all panes
  on the current tab and normal mode.


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. 
* __tmux__ - provides convenience keybindings emulating simple tmux behaviour
* __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.
* __session__ - allows detaching from a session.


Theme
=====
A color theme can be defined either in truecolor, or 256 format.
Truecolor:
```
fg: [0, 0, 0]
```
256:
```
fg: 0
```
The color theme can be specified in the following way:
```
themes:
  default:
    fg: [0,0,0]
    bg: [0,0,0]
    black: [0,0,0]
    red: [0,0,0]
    green: [0,0,0]
    yellow: [0,0,0]
    blue: [0,0,0]
    magenta: [0,0,0]
    cyan: [0,0,0]
    white: [0,0,0]
    orange: [0,0,0]
```

If the theme is called `default`, then zellij will pick it on startup.
To specify a different theme, run zellij with:
```
zellij options --theme [NAME]
```
or put the name in the configuration file with `theme: [NAME]`.

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 directory location:
* Linux: _$XDG_HOME/zellij /home/alice/.config/zellij_
* macOS: _/Users/Alice/Library/Application Support/com.Zellij-Contributors.zellij_

Default user layout directory location:
* Subdirectory called `layouts` inside of the configuration directory.
* Linux: _$XDG_HOME/zellij/layouts /home/alice/.config/zellij/layouts
* macOS: _/Users/Alice/Library/Application/layouts Support/com.Zellij-Contributors.zellij/layouts_

Default plugin directory location:
* Linux: _$XDG_DATA_HOME/zellij/plugins /home/alice/.local/share/plugins


ENVIRONMENT
===========
ZELLIJ_CONFIG_FILE
  Path of Zellij config to load.
ZELLIJ_CONFIG_DIR
  Path of the Zellij config directory.



NOTES
=====

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

https://zellij.dev/documentation