Skip to content

Latest commit

 

History

History
318 lines (278 loc) · 20.3 KB

apps.md

File metadata and controls

318 lines (278 loc) · 20.3 KB

Text-based Desktop Environment

Desktop Objects / Built-in Applications

Type Object Description
teletype Teletype Console A solid rectangular truecolor text canvas depicting a freely scrollable buffer of the text runs generated by an xterm-compatible parser from the standard output of an attached CUI application. It can be a very heavy object due to maintaining a scrollback buffer of arbitrary length. Not used directly in the desktop process's address space.
terminal Terminal Console A derivative of Teletype Console with additional UI controls.
dtvt DirectVT Gateway A lightweight truecolor text canvas depicting content received from an external dtvt-aware process.
vtty Teletype Console dtvt‑bridge A DirectVT Gateway hosting an external standalone Teletype Console process. It is designed to run a heavy Teletype Console object in the external process's address space to optimize desktop resource consumption.
term Terminal Console dtvt‑bridge A DirectVT Gateway hosting an external standalone Terminal Console process. It is designed to run a heavy Terminal Console object in the external process's address space to optimize desktop resource consumption.
dtty DirectVT Gateway with TTY A derivative of DirectVT Gateway stacked with additional limited Teletype Console as a controlling terminal. It is used for CUI applications that redirect DirectVT traffic to standard output and require user input via platform's TTY. Depending on activity the corresponding console became active for the user.
tile Tiling Window Manager A window container with an organization of the hosting window area into mutually non-overlapping panes for nested windows.
site Desktop Region Marker A transparent resizable frame for marking the specific desktop region for quick navigation across the borderless workspace.

Teletype / Terminal Console

Features

  • UTF-8 Everywhere
  • TrueColor aware
  • Horizontal scrolling
  • Infinite* scrollback (40k lines by default, * < max_int32)
  • Scrollback buffer searching and matching
  • Line-based/rect-block text selection:
    • Ctrl: Extend selection.
    • Alt/Option: Change selection mode (line/block).
    • Double left click: Select a word.
    • Triple left click: Select paragraph.
    • Quadruple left click: Select the entire scrollback buffer or semantic block (when using OSC 133).
    • Quintuple left click: Select the entire scrollback buffer.
  • Widely used clipboard formats support:
    • Plain text
    • RTF
    • HTML
    • ANSI/VT
    • Protected (Windows only: ExcludeClipboardContentFromMonitorProcessing, CanIncludeInClipboardHistory, CanUploadToCloudClipboard)
  • VT-100 terminal emulation compatible (pass vttest 1 and 2 sections)
  • Built-in Windows Console API server:
    • Legacy Win32 Console API support
    • No Windows Console Host (conhost.exe) dependency
    • Fullduplex pass-through VT input/output
    • OEM/National, UTF-8 and UTF-16 encoding, even in cmd.exe
    • Enforced ENABLE_WINDOW_INPUT mode
      Note: In fact it is a viewport resize event reporting. Viewport dimensions is always equal to the win32 console buffer dimensions.
    • Enforced ENABLE_PROCESSED_OUTPUT and ENABLE_VIRTUAL_TERMINAL_PROCESSING modes
    • Disabled ENABLE_QUICK_EDIT_MODE mode
    • Per process instance (not per process name) cmd.exe input history, aka "line input"/"cooked read"
    • Disabled DOSKEY functionality (cmd.exe's F7 input history popups too)
      Note: Sharing the input history as well as a bunch of command aliases among processes (which could have different elevation levels) is a huge security threat. So DOSKEY functionality is absolutely incompatible with any sort of sudo-like commands/applications.
  • Outside terminal viewport mouse tracking (See #62 for details)
  • Stdin/stdout parser log on demand
  • Configurable at startup via settings.xml
  • Configurable in runtime using VT-sequences

Custom SGR attributes

Name Sequence Description
grid color CSI 68 : 2 :: r : g : b m
CSI 68 : 5 : n m
CSI 68 : n m
Set grid color.
reset grid color CSI 69 m Reset grid color (sync with foreground color).

Runtime configuraion vt-sequences

Name Sequence Description
CCC_SBS CSI 24 : n : m : q p Scrollback buffer configuration
n Initial buffer size
m Grow step
q Grow limit
CCC_SGR CSI 28 : Pm p Set terminal background using SGR attributes (one attribute at once)
Pm Colon-separated list of attributes, 0 — reset all attributes, default is 0
CCC_SEL CSI 29 : n p Set selection mode
n = 0 Selection is off (default)
n = 1 Select and copy as plaintext
n = 2 Select and copy as ANSI/VT text
n = 3 Select and copy as RTF-document
n = 4 Select and copy as HTML-code
n = 5 Select and copy as protected plaintext (suppressed preview, details)
CCC_PAD CSI 30 : n p Set scrollbuffer side padding
n Width in cells, max = 255, default is 0
CCC_RST CSI 1 p Reset all parameters to default
CCC_TBS CSI 5 : n p Set tab length
n Length in cells, max = 256, default is 8
CCC_JET CSI 11 : n p Set text alignment, default is Left
n = 0 default
n = 1 Left
n = 2 Right
n = 3 Center
CCC_WRP CSI 12 : n p Set text autowrap mode, default is On
n = 0 default
n = 1 On
n = 2 Off (enable horizontal scrolling)
CCC_RTL CSI 13 : n p Set text right-to-left mode, default is Off
n = 0 default
n = 1 On
n = 2 Off

Note: It is possible to combine multiple command into a single sequence using a semicolon. For example, the following sequence disables wrapping, enables text selection, and sets background to blue: CSI 12 : 2 ; 29 : 1 ; 28 : 44 p or CSI 12 : 2 ; 29 : 1 ; 28 : 48 : 2 : 0 : 0 : 255 p.

Custom menu configuration

Terminal window menu can be composed from scratch by specifying a list of menu items in the <config/term/menu/> configuration file section.

Attributes for the <config/term/menu/item> object

Attribute Description
type Menu item type. type=Command is used by default.
label Menu item label list. One or more textual representations selected by data= value.
notes Tooltip.
action The function name which called on item activation. Inherited by the label attribute.
data Textual parameter for function call. Inherited by the label attribute.
hotkey Keyboard shortcut for this menu item. Inherited by the label attribute (not implemented).

Attributes for the <config/term/menu/item/label> sub-object

Attribute Description
internal_value Label display variation label="_internal_value_".
notes Tooltip. Inherited from item if not specified.
action The function name which called on item activation. Inherited from item if not specified.
data Textual parameter for function call. Inherited from item if not specified.
hotkey Keyboard shortcut for this menu item. Inherited from item if not specified (not implemented).

Attribute type=

Value Description
Option Cyclically selects the next label in the list and exec the function specified by the action= with data= as its parameter.
Command Exec the function specified by the action= with data= as its parameter.
Repeat Selects the next label and exec the function specified by the action= with data= as its parameter repeatedly from the time it is pressed until it is released.

Attribute action=

* - Not implemented.

Value Description
TerminalCwdSync Current working directory sync toggle. The command to send for synchronization is configurable via the <config><term cwdsync=" cd $P\n"/></config> setting's option. Where $P is a variable containing current path received via OSC 9;9 notification.
To enable OSC9;9 shell notifications:
- Windows Command Prompt:
setx PROMPT $e]9;9;$P$e\$P$G
- PowerShell:
function prompt{ $e=[char]27; "$e]9;9;$(Convert-Path $pwd)$e\PS $pwd$('>' * ($nestedPromptLevel + 1)) " }
- Bash:
export PS1='\[\033]9;9;\w\033\\\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
TerminalWrapMode Set terminal scrollback lines wrapping mode. Applied to the active selection if it is. The data= attribute can have the following values on, off.
TerminalAlignMode Set terminal scrollback lines aligning mode. Applied to the active selection if it is. The data= attribute can have the following values left, right, center.
TerminalFindNext Highlight next match of selected text fragment. Clipboard content is used if no active selection.
TerminalFindPrev Highlight previous match of selected text fragment. Clipboard content is used if no active selection.
TerminalOutput Direct output the data= value to the terminal scrollback.
TerminalSendKey Simulating keypresses using the data= string.
TerminalQuit Terminate runnning console apps and close terminal.
TerminalRestart Terminate runnning console apps and restart current session.
TerminalFullscreen Toggle fullscreen mode.
TerminalUndo (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last input.
TerminalRedo (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last Undo command.
TerminalClipboardPaste Paste from clipboard.
TerminalClipboardWipe Reset clipboard.
TerminalSelectionMode Set terminal text selection mode.
The data= attribute can have the following values none, text, ansi, rich, html, protected.
TerminalSelectionCopy Сopy selection to clipboard.
TerminalSelectionRect Set linear(false) or rectangular(true) selection form using boolean value.
TerminalSelectionClear Deselect a selection.
TerminalSelectionOneShot One-shot toggle to copy text while mouse tracking is active. Keep selection if Ctrl key is pressed.
The data= attribute can have the following values none, text, ansi, rich, html, protected.
TerminalViewportCopy Сopy viewport to clipboard.
TerminalViewportPageUp Scroll one page up.
TerminalViewportPageDown Scroll one page down.
TerminalViewportLineUp Scroll N lines up.
TerminalViewportLineDown Scroll N lines down.
TerminalViewportPageLeft Scroll one page to the left.
TerminalViewportPageRight Scroll one page to the right.
TerminalViewportColumnLeft Scroll N cells to the left.
TerminalViewportColumnRight Scroll N cells to the right.
TerminalViewportTop Scroll to the scrollback top.
TerminalViewportEnd Scroll to the scrollback bottom (reset viewport position).
TerminalStdioLog Stdin/stdout log toggle.
*TerminalLogStart Start logging to file.
*TerminalLogPause Pause logging.
*TerminalLogStop Stop logging.
*TerminalLogAbort Abort logging.
*TerminalLogRestart Restart logging to file.
*TerminalVideoRecStart Start DirectVT(dtvt) video recording to file.
*TerminalVideoRecStop Stop dtvt-video recording.
*TerminalVideoRecPause Pause dtvt-video recording.
*TerminalVideoRecAbort Abort dtvt-video recording.
*TerminalVideoRecRestart Restart dtvt-video recording to file.
*TerminalVideoPlay Play dtvt-video from file.
*TerminalVideoPause Pause dtvt-video.
*TerminalVideoStop Stop dtvt-video.
*TerminalVideoForward Fast forward dtvt-video by N ms.
*TerminalVideoBackward Rewind dtvt-video by N ms.
*TerminalVideoHome Rewind dtvt-video to the beginning.
*TerminalVideoEnd Rewind dtvt-video to the end.

Terminal configuration example

<config>
    <term>
        <menu item*>
            <autohide=true />  <!-- If true, show menu only on hover. -->
            <enabled=1 />
            <slim=1 />
            <item label="<" action=TerminalFindPrev>  <!-- type=Command is a default item's attribute. -->
                <label="\e[38:2:0:255:0m<\e[m"/>
                <notes>
                    " Previous match                                  \n"
                    "   LeftClick to jump to previous match or scroll \n"
                    "             one page up if nothing to search    \n"
                    "   Match clipboard data if no selection          \n"
                    "   Left+RightClick to clear clipboard            "
                </notes>
            </item>
            <item label=">" action=TerminalFindNext>
                <label="\e[38:2:0:255:0m>\e[m"/>
                <notes>
                    " Next match                                     \n"
                    "   LeftClick to jump to next match or scroll    \n"
                    "             one page down if nothing to search \n"
                    "   Match clipboard data if no selection         \n"
                    "   Left+RightClick to clear clipboard           "
                </notes>
            </item>
            <item label="Wrap" type=Option action=TerminalWrapMode data="off">
                <label="\e[38:2:0:255:0mWrap\e[m" data="on"/>
                <notes>
                    " Wrapping text lines on/off      \n"
                    " - applied to selection if it is "
                </notes>
            </item>
            <item label="Selection" notes=" Text selection mode " type=Option action=TerminalSelectionMode data="none">  <!-- type=Option means that the тext label will be selected when clicked.  -->
                <label="\e[38:2:0:255:0mPlaintext\e[m" data="text"/>
                <label="\e[38:2:255:255:0mANSI-text\e[m" data="ansi"/>
                <label data="rich">
                    "\e[38:2:109:231:237m""R"
                    "\e[38:2:109:237:186m""T"
                    "\e[38:2:60:255:60m"  "F"
                    "\e[38:2:189:255:53m" "-"
                    "\e[38:2:255:255:49m" "s"
                    "\e[38:2:255:189:79m" "t"
                    "\e[38:2:255:114:94m" "y"
                    "\e[38:2:255:60:157m" "l"
                    "\e[38:2:255:49:214m" "e" "\e[m"
                </label>
                <label="\e[38:2:0:255:255mHTML-code\e[m" data="html"/>
                <label="\e[38:2:0:255:255mProtected\e[m" data="protected"/>
            </item>
            <item label="Log" notes=" Stdin/out logging is off " type=Option action=TerminalStdioLog data="off">
                <label="\e[38:2:0:255:0mLog\e[m" notes=" Stdin/out logging is on \n Run Logs to see output  " data="on"/>
            </item>
            <item label="  "    notes=" ...empty menu block/splitter for safety "/>
            <item label="Clear" notes=" Clear TTY viewport "                  action=TerminalOutput data="\e[2J"/>
            <item label="Reset" notes=" Clear scrollback and SGR-attributes " action=TerminalOutput data="\e[!p"/>
            <item label="Restart" type=Command action=TerminalRestart/>
            <item label="Top" action=TerminalViewportTop/>
            <item label="End" action=TerminalViewportEnd/>

            <item label="PgLeft"    type=Repeat action=TerminalViewportPageLeft/>
            <item label="PgRight"   type=Repeat action=TerminalViewportPageRight/>
            <item label="CharLeft"  type=Repeat action=TerminalViewportCharLeft/>
            <item label="CharRight" type=Repeat action=TerminalViewportCharRight/>

            <item label="PgUp"   type=Repeat action=TerminalViewportPageUp/>
            <item label="PgDn"   type=Repeat action=TerminalViewportPageDown/>
            <item label="LineUp" type=Repeat action=TerminalViewportLineUp/>
            <item label="LineDn" type=Repeat action=TerminalViewportLineDown/>

            <item label="PrnScr" action=TerminalViewportCopy/>
            <item label="Deselect" action=TerminalSelectionClear/>
            
            <item label="Line" type=Option action=TerminalSelectionRect data="false">
                <label="Rect" data="true"/>
            </item>
            <item label="Copy" type=Repeat action=TerminalSelectionCopy/>
            <item label="Paste" type=Repeat action=TerminalClipboardPaste/>
            <item label="Undo" type=Command action=TerminalUndo/>
            <item label="Redo" type=Command action=TerminalRedo/>
            <item label="Quit" type=Command action=TerminalQuit/>
            <item label="Fullscreen" type=Command action=TerminalFullscreen/>

            <item label="Hello, World!" notes=" Simulating keypresses "       action=TerminalSendKey data="Hello World!"/>
            <item label="Push Me" notes=" test " type=Repeat action=TerminalOutput data="pressed ">
                <label="\e[37mPush Me\e[m"/>
            </item>

            <item label=" HTML " data=none type=Option action=TerminalSelectionOneShot>
                <label="\e[48:2:0:128:128;38:2:0:255:255m HTML \e[m" data=html/>
                <notes>
                    " One-shot toggle to copy as HTML \n"
                    " while mouse tracking is active. "
                </notes>
            </item>
            <item label=" Text " data=none type=Option action=TerminalSelectionOneShot>
                <label="\e[48:2:0:128:0;38:2:0:255:0m Text \e[m" data=text/>
                <notes>
                    " One-shot toggle to copy as Text \n"
                    " while mouse tracking is active. "
                </notes>
            </item>
            <item label="One-Shot" data=none type=Option action=TerminalSelectionOneShot>
                <label="\e[48:2:0:128:0;38:2:0:255:0m  Text  \e[m" data=text/>
                <label="\e[48:2:0:128:128;38:2:0:255:255m  HTML  \e[m" data=html/>
                <notes>
                    " One-shot toggle to copy as Text/HTML \n"
                    " while mouse tracking is active.      "
                </notes>
            </item>
        </menu>
    </term>
</config>

DirectVT Gateway

DirectVT Gateway is used to attach DirectVT-aware sources. It is mainly used to receive DirectVT traffic from an external dtvt-endpoint.

DirectVT Gateway with TTY

DirectVT Gateway with TTY is used when there is a need for interactive interaction with the user through the controlling terminal. For example, this is required when connecting via SSH with keyboard-interactive authentication or requesting a private key passphrase.

In case of running in standalone mode this window object type is used automatically if the first command line argument begins with ssh keyword.

The following commands are identical:

vtm -r dtty ssh user@host vtm
vtm ssh user@host vtm

Desktop Region Marker

The Desktop Region Marker is used to quickly navigate the desktop by left-clicking on an instance in the taskbar. The region title can be set using the clipboard text data by right-clicking once on the region frame (swap clipboard text with title text).

Tiling Window Manager

Tiling Window Manager is a window container that organizes the workspace into mutually non-overlapping panes for nested windows.

Features

  • Supports Drag and Drop for panes (like tabs in a browser).
  • Use any modifier (Ctrl or Alt) while pane dragging to deactivate drag&drop mode.
  • List of panes (outside the right side of the Tile window)
    • LeftClick -- Set exclusive focus
    • Ctrl+LeftClick -- Set/Unset group focus
    • double LeftClick -- Maxixmize/restore
  • Configurable via settings (See configuration example in doc\settings.md`).