Skip to content

Commit

Permalink
Merge pull request #680 from o-sdn-o/gui-bridge
Browse files Browse the repository at this point in the history
Gui bridge
  • Loading branch information
o-sdn-o authored Nov 12, 2024
2 parents 238bdd0 + fb3ade9 commit da7b487
Show file tree
Hide file tree
Showing 16 changed files with 339 additions and 280 deletions.
86 changes: 47 additions & 39 deletions doc/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ label | Menu item label list. One or more textual representations selected
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

Expand All @@ -88,7 +87,6 @@ _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=`

Expand Down Expand Up @@ -162,7 +160,7 @@ Value | Unique for hotkeys | Default Hotkey
-----------------------------|--------------------|------------------------------|------------
Drop | x | | Drop all events for the specified key combination. No further processing.
DropAutoRepeat | x | | Drop `Key Repeat` events for the specified key combination. This binding should be specified before the main action for the key combination.
ToggleHotkeyMode | x | `Ctrl-Alt`, `Alt-Ctrl` | Toggle hotkey mode between mode=0 (deafult) and mode=1.
ToggleHotkeyScheme | x | `Ctrl-Alt`, `Alt-Ctrl` | Toggle hotkey scheme between `0` (default) `1`.
TerminalFindNext | | `Alt+RightArrow` | Highlight next match of selected text fragment. Clipboard content is used if no active selection.
TerminalFindPrev | | `Alt+LeftArrow` | Highlight previous match of selected text fragment. Clipboard content is used if no active selection.
TerminalViewportOnePageUp | x | `Shift+Ctrl+PageUp` | Scroll one page up.
Expand Down Expand Up @@ -218,6 +216,16 @@ TerminalSelectionOneShot | |
" Left+RightClick to clear clipboard "
</notes>
</item>
<item type="Command" action=ToggleHotkeyScheme>
<label=" Undef " data="undef"/>
<label=" Keys0 " data="off"/>
<label="\e[48:2:0:128:128;38:2:0:255:0m Keys1 \e[m" data="on"/>
<notes>
" Toggle hotkey scheme \n"
" Alternative hotkey scheme allows keystrokes \n"
" to be passed through without processing "
</notes>
</item>
<item label="Wrap" type="Option" action=TerminalWrapMode data="off">
<label="\e[38:2:0:255:0mWrap\e[m" data="on"/>
<notes>
Expand Down Expand Up @@ -305,46 +313,46 @@ TerminalSelectionOneShot | |
</menu>
</term>
<hotkeys> <!-- The required key combination sequence can be generated on the Info page, accessible by clicking on the label in the lower right corner of the vtm desktop. -->
<tui key*> <!-- TUI matrix layer key bindings. The mode=0 is implicitly used by default. -->
<tui key*> <!-- TUI matrix layer key bindings. The scheme=0 is implicitly used by default. -->
<key="Space-Backspace" action=ToggleDebugOverlay/> <!-- Toggle debug overlay. -->
<key="Backspace-Space" action=ToggleDebugOverlay/> <!-- Toggle debug overlay (reversed release order). -->
<key="Ctrl-Alt" action=ToggleHotkeyMode/> <!-- Toggle hotkey mode to mode=1 by pressing and releasing Ctrl-Alt. -->
<key="Alt-Ctrl" action=ToggleHotkeyMode/> <!-- Toggle hotkey mode to mode=1 by pressing and releasing Alt-Ctrl (reversed releasing). -->
<key="Ctrl-Alt" mode=1 action=ToggleHotkeyMode/> <!-- Toggle hotkey mode to mode=0 (default) by pressing and releasing Ctrl-Alt. -->
<key="Alt-Ctrl" mode=1 action=ToggleHotkeyMode/> <!-- Toggle hotkey mode to mode=0 (default) by pressing and releasing Alt-Ctrl (reversed releasing). -->
<key="Ctrl-Alt" action=ToggleHotkeyScheme/> <!-- Toggle hotkey scheme to 1 by pressing and releasing Ctrl-Alt. -->
<key="Alt-Ctrl" action=ToggleHotkeyScheme/> <!-- Toggle hotkey scheme to 1 by pressing and releasing Alt-Ctrl (reversed releasing). -->
<key="Ctrl-Alt" scheme=1 action=ToggleHotkeyScheme/> <!-- Toggle hotkey scheme to 0 (default) by pressing and releasing Ctrl-Alt. -->
<key="Alt-Ctrl" scheme=1 action=ToggleHotkeyScheme/> <!-- Toggle hotkey scheme to 0 (default) by pressing and releasing Alt-Ctrl (reversed releasing). -->
</tui>
<term key*>
<key="Alt+RightArrow" action=TerminalFindNext/> <!-- Highlight next match of selected text fragment. Clipboard content is used if no active selection. -->
<key="Alt+LeftArrow" action=TerminalFindPrev/> <!-- Highlight previous match of selected text fragment. Clipboard content is used if no active selection. -->
<key="Shift+Ctrl+PageUp" action=TerminalViewportOnePageUp/> <!-- Scroll one page up. -->
<key="Shift+Ctrl+PageDown" action=TerminalViewportOnePageDown/> <!-- Scroll one page down. -->
<key="Ctrl+PageUp" mode=1 action=TerminalViewportOnePageUp/> <!-- Scroll one page up. -->
<key="Ctrl+PageDown" mode=1 action=TerminalViewportOnePageDown/> <!-- Scroll one page down. -->
<key="Shift+Alt+LeftArrow" action=TerminalViewportOnePageLeft/> <!-- Scroll one page to the left. -->
<key="Shift+Alt+RightArrow" action=TerminalViewportOnePageRight/> <!-- Scroll one page to the right. -->
<key="Shift+Ctrl+UpArrow" action=TerminalViewportOneCharUp/> <!-- Scroll one line up. -->
<key="Shift+Ctrl+DownArrow" action=TerminalViewportOneCharDown/> <!-- Scroll one line down. -->
<key="Shift+Ctrl+LeftArrow" action=TerminalViewportOneCharLeft/> <!-- Scroll one cell to the left. -->
<key="Shift+Ctrl+RightArrow" action=TerminalViewportOneCharRight/> <!-- Scroll one cell to the right. -->
<key="Shift+Ctrl+Home" action=TerminalViewportTop/> <!-- Scroll to the scrollback top. -->
<key="Shift+Ctrl+End" action=TerminalViewportEnd/> <!-- Scroll to the scrollback bottom (reset viewport position). -->
<key="" action=TerminalViewportCopy/> <!-- Сopy viewport to clipboard. -->
<key="" action=TerminalClipboardPaste/> <!-- Paste from clipboard. -->
<key="" action=TerminalClipboardWipe/> <!-- Reset clipboard. -->
<key="" action=TerminalUndo/> <!-- (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last input. -->
<key="" action=TerminalRedo/> <!-- (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last Undo command. -->
<key="" action=TerminalToggleCwdSync/> <!-- Toggle the current working directory sync mode. 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\]\$ '` -->
<key="" action=TerminalToggleWrapMode/> <!-- Toggle terminal scrollback lines wrapping mode. Applied to the active selection if it is. The argument is boolean. -->
<key="" action=TerminalToggleSelectionMode/> <!-- Toggle between linear(0) and rectangular(1) selection form. -->
<key="" action=TerminalToggleFullscreen/> <!-- Toggle fullscreen mode. -->
<key="" action=TerminalToggleMaximize/> <!-- Toggle between maximized and normal window size. -->
<key="" action=TerminalToggleStdioLog/> <!-- Stdin/stdout log toggle. -->
<key="" action=TerminalQuit/> <!-- Terminate runnning console apps and close terminal. -->
<key="" action=TerminalRestart/> <!-- Terminate runnning console apps and restart current session. -->
<key="" action=TerminalSwitchCopyMode/> <!-- Set terminal text selection mode. The argument can be the one of the following values 0:'none', 1:'text', 2:'ansi', 3:'rich', 4:'html', 5:'protected'. -->
<key="" action=TerminalSelectionCopy/> <!-- Сopy selection to clipboard. -->
<key="Esc" action=TerminalSelectionCancel/> <!-- Deselect a selection. -->
<key="" action=TerminalSelectionOneShot/> <!-- One-shot toggle to copy text while mouse tracking is active. Keep selection if 'Ctrl' key is pressed. The argument can be the one of the following values 0:'none', 1:'text', 2:'ansi', 3:'rich', 4:'html', 5:'protected'. -->
<key="Alt+RightArrow" action=TerminalFindNext/> <!-- Highlight next match of selected text fragment. Clipboard content is used if no active selection. -->
<key="Alt+LeftArrow" action=TerminalFindPrev/> <!-- Highlight previous match of selected text fragment. Clipboard content is used if no active selection. -->
<key="Shift+Ctrl+PageUp" action=TerminalViewportOnePageUp/> <!-- Scroll one page up. -->
<key="Shift+Ctrl+PageDown" action=TerminalViewportOnePageDown/> <!-- Scroll one page down. -->
<key="Ctrl+PageUp" scheme=1 action=TerminalViewportOnePageUp/> <!-- Scroll one page up. -->
<key="Ctrl+PageDown" scheme=1 action=TerminalViewportOnePageDown/> <!-- Scroll one page down. -->
<key="Shift+Alt+LeftArrow" action=TerminalViewportOnePageLeft/> <!-- Scroll one page to the left. -->
<key="Shift+Alt+RightArrow" action=TerminalViewportOnePageRight/> <!-- Scroll one page to the right. -->
<key="Shift+Ctrl+UpArrow" action=TerminalViewportOneCharUp/> <!-- Scroll one line up. -->
<key="Shift+Ctrl+DownArrow" action=TerminalViewportOneCharDown/> <!-- Scroll one line down. -->
<key="Shift+Ctrl+LeftArrow" action=TerminalViewportOneCharLeft/> <!-- Scroll one cell to the left. -->
<key="Shift+Ctrl+RightArrow" action=TerminalViewportOneCharRight/> <!-- Scroll one cell to the right. -->
<key="Shift+Ctrl+Home" action=TerminalViewportTop/> <!-- Scroll to the scrollback top. -->
<key="Shift+Ctrl+End" action=TerminalViewportEnd/> <!-- Scroll to the scrollback bottom (reset viewport position). -->
<key="" action=TerminalViewportCopy/> <!-- Сopy viewport to clipboard. -->
<key="" action=TerminalClipboardPaste/> <!-- Paste from clipboard. -->
<key="" action=TerminalClipboardWipe/> <!-- Reset clipboard. -->
<key="" action=TerminalUndo/> <!-- (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last input. -->
<key="" action=TerminalRedo/> <!-- (Win32 Cooked/ENABLE_LINE_INPUT mode only) Discard the last Undo command. -->
<key="" action=TerminalToggleCwdSync/> <!-- Toggle the current working directory sync mode. 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\]\$ '` -->
<key="" action=TerminalToggleWrapMode/> <!-- Toggle terminal scrollback lines wrapping mode. Applied to the active selection if it is. The argument is boolean. -->
<key="" action=TerminalToggleSelectionMode/> <!-- Toggle between linear(0) and rectangular(1) selection form. -->
<key="" action=TerminalToggleFullscreen/> <!-- Toggle fullscreen mode. -->
<key="" action=TerminalToggleMaximize/> <!-- Toggle between maximized and normal window size. -->
<key="" action=TerminalToggleStdioLog/> <!-- Stdin/stdout log toggle. -->
<key="" action=TerminalQuit/> <!-- Terminate runnning console apps and close terminal. -->
<key="" action=TerminalRestart/> <!-- Terminate runnning console apps and restart current session. -->
<key="" action=TerminalSwitchCopyMode/> <!-- Set terminal text selection mode. The argument can be the one of the following values 0:'none', 1:'text', 2:'ansi', 3:'rich', 4:'html', 5:'protected'. -->
<key="" action=TerminalSelectionCopy/> <!-- Сopy selection to clipboard. -->
<key="Esc" action=TerminalSelectionCancel/> <!-- Deselect a selection. -->
<key="" action=TerminalSelectionOneShot/> <!-- One-shot toggle to copy text while mouse tracking is active. Keep selection if 'Ctrl' key is pressed. The argument can be the one of the following values 0:'none', 1:'text', 2:'ansi', 3:'rich', 4:'html', 5:'protected'. -->
</term>
</hotkeys>
</config>
Expand Down
Loading

0 comments on commit da7b487

Please sign in to comment.