You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HELP.md
+51-2Lines changed: 51 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,7 @@ Cloud Commander supports the following command-line parameters:
109
109
| `--dropbox` | enable dropbox integration
110
110
| `--dropbox-token` | set dropbox token
111
111
| `--log` | enable logging
112
+
| `--user-menu` | enable user menu
112
113
| `--no-show-config` | do not show config values
113
114
| `--no-server` | do not start server
114
115
| `--no-auth` | disable authorization
@@ -137,6 +138,7 @@ Cloud Commander supports the following command-line parameters:
137
138
| `--no-dropbox` | disable dropbox integration
138
139
| `--no-dropbox-token` | unset dropbox token
139
140
| `--no-log` | disable logging
141
+
| `--no-user-menu` | disable user menu
140
142
141
143
For options not specified by command-line parameters, Cloud Commander then reads configuration data from `~/.cloudcmd.json`. It uses port `8000` by default.
@@ -421,7 +423,8 @@ Here's a description of all options:
421
423
"importListen":false, // listen on config updates
422
424
"dropbox":false, // disable dropbox integration
423
425
"dropboxToken":"", // unset dropbox token
424
-
"log":true// logging
426
+
"log":true, // logging
427
+
"userMenu":false// do not show user menu
425
428
}
426
429
```
427
430
@@ -458,6 +461,52 @@ Some config options can be overridden with environment variables, such as:
458
461
-`CLOUDCMD_IMPORT_TOKEN` - authorization token used to connect to export server
459
462
-`CLOUDCMD_IMPORT_URL` - url of an import server
460
463
-`CLOUDCMD_IMPORT_LISTEN`- enable listen on config updates from import server
464
+
-`CLOUDCMD_USER_MENU`- enable `user menu`
465
+
466
+
### User Menu
467
+
468
+
You can enable `user menu` with help of a flag `--user-menu` (consider that file rename using `F2` will be disabled).
469
+
When you press `F2` Cloud Commander will a file `.cloudcmd.menu.js` by walking up parent directories, if can't read it will try to read `~/.cloudcmd.menu.js`.
470
+
Let's consider example `user menu` works file:
471
+
472
+
```js
473
+
module.exports= {
474
+
'F2 - Rename file':async ({DOM}) => {
475
+
awaitDOM.renameCurrent();
476
+
},
477
+
'D - Build Dev':async ({CloudCmd}) => {
478
+
awaitCloudCmd.TerminalRun.show({
479
+
command:'npm run build:client:dev',
480
+
autoClose:false,
481
+
closeMessage:'Press any button to close Terminal',
482
+
});
483
+
484
+
CloudCmd.refresh();
485
+
},
486
+
'P - Build Prod':async ({CloudCmd}) => {
487
+
awaitCloudCmd.TerminalRun.show({
488
+
command:'npm run build:client',
489
+
autoClose:true,
490
+
});
491
+
492
+
CloudCmd.refresh();
493
+
},
494
+
};
495
+
```
496
+
497
+
You will have ability to run one of this 3 commands with help of double click, enter, or binded key (`F2`, `D` or `P` in this example). Also you can run commands in terminal, or execute any built-in function of `Cloud Commander` extended it's interface.
498
+
499
+
#### User Menu API
500
+
501
+
Here you can find `API` that can be used in **User Menu**. **DOM** and **CloudCmd** to main objects you receive in arguments list using destructuring.
502
+
503
+
**DOM** contains all base functions of `Cloud Commander` (rename, remove, download etc);
504
+
505
+
-`renameCurrent` - shows renames current file dialog, and does renaming.
506
+
507
+
**CloudCmd** contains all modules (`Terminal`, `View`, `Edit`, `Config`, `Console` etc);
508
+
509
+
-`TerminalRun` - module that shows `Terminal` with a `command` from options and closes terminal when everything is done.
0 commit comments