summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/plugin_api/plugin_command.proto
blob: b961593e7b1f76cd9d233605e157ca36994a5cf3 (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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
syntax = "proto3";

import "action.proto";
import "event.proto";
import "file.proto";
import "command.proto";
import "message.proto";
import "resize.proto";
import "plugin_permission.proto";

package api.plugin_command;

enum CommandName {
  Subscribe = 0;
  Unsubscribe = 1;
  SetSelectable = 2;
  GetPluginIds = 3;
  GetZellijVersion = 4;
  OpenFile = 5;
  OpenFileFloating = 6;
  OpenTerminal = 7;
  OpenTerminalFloating = 8;
  OpenCommandPane = 9;
  OpenCommandPaneFloating = 10;
  SwitchTabTo = 11;
  SetTimeout = 12;
  ExecCmd = 13;
  PostMessageTo = 14;
  PostMessageToPlugin = 15;
  HideSelf = 16;
  ShowSelf = 17;
  SwitchToMode = 18;
  NewTabsWithLayout = 19;
  NewTab = 20;
  GoToNextTab = 21;
  GoToPreviousTab = 22;
  Resize = 23;
  ResizeWithDirection = 24;
  FocusNextPane = 25;
  FocusPreviousPane = 26;
  MoveFocus = 27;
  MoveFocusOrTab = 28;
  Detach = 29;
  EditScrollback = 30;
  Write = 31;
  WriteChars = 32;
  ToggleTab = 33;
  MovePane = 34;
  MovePaneWithDirection = 35;
  ClearScreen = 36;
  ScrollUp = 37;
  ScrollDown = 38;
  ScrollToTop = 39;
  ScrollToBottom = 40;
  PageScrollUp = 41;
  PageScrollDown = 42;
  ToggleFocusFullscreen = 43;
  TogglePaneFrames = 44;
  TogglePaneEmbedOrEject = 45;
  UndoRenamePane = 46;
  CloseFocus = 47;
  ToggleActiveTabSync = 48;
  CloseFocusedTab = 49;
  UndoRenameTab = 50;
  QuitZellij = 51;
  PreviousSwapLayout = 52;
  NextSwapLayout = 53;
  GoToTabName = 54;
  FocusOrCreateTab = 55;
  GoToTab = 56;
  StartOrReloadPlugin = 57;
  CloseTerminalPane = 58;
  ClosePluginPane = 59;
  FocusTerminalPane = 60;
  FocusPluginPane = 61;
  RenameTerminalPane = 62;
  RenamePluginPane = 63;
  RenameTab = 64;
  ReportCrash = 65;
  RequestPluginPermissions = 66;
  SwitchSession = 67;
  OpenTerminalInPlace = 68;
  OpenCommandInPlace = 69;
  OpenFileInPlace = 70;
  RunCommand = 71;
  WebRequest = 72;
  DeleteDeadSession = 73;
  DeleteAllDeadSessions = 74;
  RenameSession = 75;
  UnblockCliPipeInput = 76;
  BlockCliPipeInput = 77;
  CliPipeOutput = 78;
  MessageToPlugin = 79;
  DisconnectOtherClients = 80;
  KillSessions = 81;
  ScanHostFolder = 82;
  WatchFilesystem = 83;
  DumpSessionLayout = 84;
  CloseSelf = 85;
}

message PluginCommand {
  CommandName name = 1;
  oneof payload {
    SubscribePayload subscribe_payload = 2;
    UnsubscribePayload unsubscribe_payload = 3;
    bool set_selectable_payload = 4;
    OpenFilePayload open_file_payload = 5;
    OpenFilePayload open_file_floating_payload = 6;
    OpenFilePayload open_terminal_payload = 7;
    OpenFilePayload open_terminal_floating_payload = 8;
    OpenCommandPanePayload open_command_pane_payload = 9;
    OpenCommandPanePayload open_command_pane_floating_payload = 10;
    SwitchTabToPayload switch_tab_to_payload = 11;
    SetTimeoutPayload set_timeout_payload = 12;
    ExecCmdPayload exec_cmd_payload = 13;
    PluginMessagePayload post_message_to_payload = 14;
    PluginMessagePayload post_message_to_plugin_payload = 15;
    bool show_self_payload = 16;
    action.SwitchToModePayload switch_to_mode_payload = 17;
    string new_tabs_with_layout_payload = 18;
    ResizePayload resize_payload = 19;
    ResizePayload resize_with_direction_payload = 20;
    MovePayload move_focus_payload = 21;
    MovePayload move_focus_or_tab_payload = 22;
    bytes write_payload = 23;
    string write_chars_payload = 24;
    MovePayload move_pane_with_direction_payload = 25;
    string go_to_tab_name_payload = 26;
    string focus_or_create_tab_payload = 27;
    uint32 go_to_tab_payload = 28;
    string start_or_reload_plugin_payload = 29;
    uint32 close_terminal_pane_payload = 30;
    uint32 close_plugin_pane_payload = 31;
    action.PaneIdAndShouldFloat focus_terminal_pane_payload = 32;
    action.PaneIdAndShouldFloat focus_plugin_pane_payload = 33;
    IdAndNewName rename_terminal_pane_payload = 34;
    IdAndNewName rename_plugin_pane_payload = 35;
    IdAndNewName rename_tab_payload = 36;
    string report_crash_payload = 37;
    RequestPluginPermissionPayload request_plugin_permission_payload = 38;
    SwitchSessionPayload switch_session_payload = 39;
    OpenFilePayload open_file_in_place_payload = 40;
    OpenFilePayload open_terminal_in_place_payload = 41;
    OpenCommandPanePayload open_command_pane_in_place_payload = 42;
    RunCommandPayload run_command_payload = 43;
    WebRequestPayload web_request_payload = 44;
    string delete_dead_session_payload = 45;
    string rename_session_payload = 46;
    string unblock_cli_pipe_input_payload = 47;
    string block_cli_pipe_input_payload = 48;
    CliPipeOutputPayload cli_pipe_output_payload = 49;
    MessageToPluginPayload message_to_plugin_payload = 50;
    KillSessionsPayload kill_sessions_payload = 60;
    string scan_host_folder_payload = 61;
  }
}

message KillSessionsPayload {
  repeated string session_names = 1;
}

message CliPipeOutputPayload {
  string pipe_name = 1;
  string output = 2;
}

message MessageToPluginPayload {
  optional string plugin_url = 1;
  repeated ContextItem<