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
-[Desktop taskbar menu customization](#desktop-taskbar-menu-customization)
31
+
-[Keyboard hacking](#keyboard-hacking)
31
32
-[Desktop Live Panel](panel.md)
32
33
-[Desktop objects and built-in applications](apps.md)
33
34
@@ -321,7 +322,7 @@ Desktop Region Marker<br>`site` | A transparent resizable frame for ma
321
322
322
323
Do not confuse the `Desktop Applet` names with the desktop object names, even though they are the same literally, e.g. `vtty` and `term`. Desktop objects of the same name as Desktop Applets are wrappers for heavy desktop objects that should be launched in parallel vtm processes.
323
324
324
-
# Usage scenarios
325
+
# Quick start
325
326
326
327
## Local usage
327
328
@@ -464,47 +465,82 @@ The following examples assume that vtm is installed on both the local and remote
464
465
# Note: Make sure `socat` is installed.
465
466
```
466
467
467
-
468
468
## Standard I/O stream monitoring
469
469
470
-
Vtm allows developers to visualize standard input/output streams of the running CUI applications. Launched in the `Log Monitor` mode, vtm will log the event stream of each terminal window with the `Logs` switch enabled.
470
+
It is possible to visualize standard input/output streams of the running CUI applications. Launched in the `Log Monitor` mode (`vtm -m`), vtm will log the event stream of each terminal window with the `Logs` switch enabled.
471
471
472
472
Important: Avoid enabling the `Logs` switch in the terminal window hosting the `Log Monitor` process running, this may lead to recursive event logging of event logging with unpredictable results.
473
473
474
-
## Desktop taskbar customization
474
+
## Desktop taskbar menu customization
475
475
476
476
The taskbar menu can be configured using a settings file `~/.config/vtm/settings.xml` (`%USERPROFILE%\.config\vtm\settings.xml` on Windows):
477
477
```xml
478
478
<config>
479
479
<desktop>
480
480
<taskbar>
481
-
<!-- <item*/> --><!-- Clear default item list -->
481
+
<!-- <item*/> --><!-- Uncomment to clear default item list. -->
482
482
<item splitter label="Remote Access"/>
483
483
484
-
<item id="Run remote vtm desktop in DirectVT IO mode over SSH" type=dtty cmd="ssh user@server vtm"/>
485
-
<item id="Run console app in remote terminal over SSH" type=dtty cmd="ssh user@server vtm -r term </path/to/console/app...>"/>
486
-
<item id="Run console app remotely over SSH w/o extra UI" type=dtty cmd="ssh user@server vtm </path/to/console/app...>"/>
484
+
<item id="Run remote vtm desktop in DirectVT IO mode over SSH" type="dtty" cmd="ssh user@server vtm"/>
485
+
<item id="Run console app in remote terminal over SSH" type="dtty" cmd="ssh user@server vtm -r term </path/to/console/app...>"/>
486
+
<item id="Run console app remotely over SSH w/o extra UI" type="dtty" cmd="ssh user@server vtm </path/to/console/app...>"/>
487
487
488
488
<item splitter label="Another Examples"/>
489
489
490
-
<item id="Far Manager" type=vtty cmd="far"/>
491
-
<item id="Far Manager in terminal" type=dtvt cmd="$0 -r term far"/>
490
+
<item id="Far Manager" type="vtty" cmd="far"/>
491
+
<item id="Far Manager in terminal" type="dtvt" cmd="$0 -r term far"/>
<item id="Midnight Commander in terminal" type="dtvt" cmd="$0 -r term mc"/>
495
495
496
-
<item id="Remote cmd in terminal over SSH" type=dtty cmd="ssh user@server vtm -r term cmd"/>
497
-
<item id="Remote cmd over SSH" type=dtty cmd="ssh user@server vtm cmd"/>
498
-
<item id="Remote Far Manager over SSH" type=dtty cmd="ssh user@server vtm far"/>
499
-
<item id="Remote wsl over SSH" type=dtty cmd="ssh user@server vtm wsl"/>
500
-
<item id="Remote mc over SSH" type=dtty cmd="ssh user@server vtm mc"/>
501
-
<item id="Remote wsl mc over SSH" type=dtty cmd="ssh user@server vtm wsl mc"/>
496
+
<item id="Remote cmd in terminal over SSH" type="dtty" cmd="ssh user@server vtm -r term cmd"/>
497
+
<item id="Remote cmd over SSH" type="dtty" cmd="ssh user@server vtm cmd"/>
498
+
<item id="Remote Far Manager over SSH" type="dtty" cmd="ssh user@server vtm far"/>
499
+
<item id="Remote wsl over SSH" type="dtty" cmd="ssh user@server vtm wsl"/>
500
+
<item id="Remote mc over SSH" type="dtty" cmd="ssh user@server vtm mc"/>
501
+
<item id="Remote wsl mc over SSH" type="dtty" cmd="ssh user@server vtm wsl mc"/>
502
502
</taskbar>
503
503
</desktop>
504
504
</config>
505
505
```
506
506
507
-
#### 28 Feb 2025: This functionality is under development.
507
+
## Keyboard hacking
508
+
509
+
It is possible to emulate the tmux-like keyboard prefix approach by using a global variable in the Lua-scripting runtime space. As an example, the following configuration adds the keyboard shortcut `Ctrl+B` as a toggle for an additional keyboard mode (coupled with a user-defined boolean variable named `kbmodifier`) that allows windows to be moved directly using the arrow keys:
510
+
511
+
- `~/.config/vtm/settings.xml`:
512
+
```xml
513
+
<config>
514
+
<events>
515
+
<applet><!-- Key bindings for the application window. -->
516
+
<if_mod_on="if (not kbmodifier) then return; end;"/><!-- `if_mod_on` macro definition. Do nothing if`kbmodifier` is false. -->
517
+
<script="kbmodifier = not kbmodifier; log('kbmodifier=', kbmodifier);" on="Ctrl+B"/><!-- Emulate tmux-like prefix key. The expression `log('kbmodifier=', kbmodifier);` is fordebugging purposes only (the output is visiblein the `Log Monitor`). -->
<script=if_mod_on | MoveAppletRight on="preview:RightArrow"/><!-- Use "preview:..." to get the key event before the terminal/application. -->
520
+
<script=if_mod_on | MoveAppletUp on="preview:UpArrow" /><!-- When kbmodifier is true, you can move windows using the arrow keys. -->
521
+
<script=if_mod_on | MoveAppletDown on="preview:DownArrow" /><!-- Macros like `MoveApplet...` are defined in the default configuration. You can list them with `vtm -l`. -->
522
+
<script=if_mod_on | MoveAppletTopLeft on="LeftArrow+UpArrow | UpArrow+LeftArrow" /><!-- Simultaneous key presses should also be processed if supported. -->
523
+
<script=if_mod_on | MoveAppletBottomLeft on="LeftArrow+DownArrow | DownArrow+LeftArrow" /><!-- It is convenient to specify multiple keyboard shortcuts in one definition separated by `|`. -->
- [Desktop objects and built-in applications](apps.md)
542
+
543
+
#### 28 Feb 2025: The following functionality is under development:
508
544
509
545
Additionally, the taskbar menu of the running desktop can be configured using shell piped redirection by sending script commands to the running vtm desktop:
0 commit comments