directvt / vtm Goto Github PK
View Code? Open in Web Editor NEWText-based desktop environment
License: MIT License
Text-based desktop environment
License: MIT License
Documentation
HT
: \t
Move cursor to the next tab stop.CHT
: CSI n I
Move cursor n (n x HT
) tabs forward (or the rightmost column is reached), default 1.CBT
: CSI n Z
Move cursor n tabs backward (or the leftmost column is reached, column 0), default 1.TBC
: CSI n g
Tab stops clear:
HTS
: ESC H
Horizontal tab set -- Set tab stop in the current column.CTC
(todo: necessity?): CSI n W
HTS
TBC 0
TBC 3
UTS
(todo: necessity?): CSI n spc d
alias for TBC 0
RTB
: CSI ? W
Reset tab stops to the 8 column defaults.RIS
: ESC c
Full reset -- Reset tab stops to the 8 column defaults.Related #150
The mode in which all the colors of the viewport are inverted, something just like XOR logic in monochrome terminals.
The Flying Dutchmen sometimes appears on the demo server. The session remains in the VTM even though the SSH connection is terminated. So far, I have not been able to reproduce this behavior myself.
Split and run the shell in the current working directory.
DECSTBM—Set Top and Bottom Margins
This control function sets the top and bottom margins for the current page. You cannot perform scrolling outside the margins.
Not implemented in the integrated terminal.
Possible security issues are not fully investigated/audited,
The current insertion point is calculated incorrectly. VT cursor positioning commands do not work as expected.
System: Linux jdroid 5.15.1-3-MANJARO-ARM #1 SMP PREEMPT Tue Nov 9 13:39:42 UTC 2021 aarch64 GNU/Linux
Error:
cmake --build .
[ 25%] Building CXX object CMakeFiles/vtm.dir/vtm.cpp.o
[ 50%] Linking CXX executable vtm
/usr/bin/ld: CMakeFiles/vtm.dir/vtm.cpp.o: in function `netxs::os::tty::splice(int)':
vtm.cpp:(.text._ZN5netxs2os3tty6spliceEi[_ZN5netxs2os3tty6spliceEi]+0x74): undefined reference to `pthread_create'
/usr/bin/ld: vtm.cpp:(.text._ZN5netxs2os3tty6spliceEi[_ZN5netxs2os3tty6spliceEi]+0x84): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/vtm.dir/build.make:97: vtm] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/vtm.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
From today's git head, vtm crashed on vttest number 2 "Test of Screen Features".
vttest is a pretty good initial torture test for TEs. I have some notes on what it covers that will generally handle most of the curses-based applications out there: alacritty/alacritty#240 (comment)
The objective of this technology is to enhance the domain name lookup by address resolution based on geographical location of the client.
This makes network access more convenient, compared to directing all users worldwide to multiple servers.
in order to use
foo@bar:~$ ssh [email protected]
instead of
foo@bar:~$ ssh [email protected]
foo@bar:~$ ssh [email protected]
foo@bar:~$ ssh [email protected]
foo@bar:~$ ssh [email protected]
foo@bar:~$ ssh [email protected]
when using a terminal emulator that does not support DECSET 1003, but supports DECSET 1002, mouse release events are not handled correctly.
No mouse tracking inside the integrated terminal.
Pipe ACL not applied for connection authentication under windows.
The ACLs in the default security descriptor for a named pipe grant full control to the LocalSystem account, administrators, and the creator owner. They also grant read access to members of the Everyone group and the anonymous account.
I've noticed that running vtm on the linux console and with gpm doesn't quite work. Is it meant to? Would it be difficult to support? Or am I doing something wrong? It seems that GPM mouse events are simply ignored. I'm not sure if I can achieve anything without a mouse there.
The scroll bar control has no visible elements. Neither vertical nor horizontal.
Make it possible to use only keyboard.
Ctrl + PgUp/PgDn
switch between windowsAlt + Z
Alt + Arrows
/Ctrl + Arrows
to access window menuAll operations can be done with either the mouse or the keyboard.
x-link: Keyboard shortcut escape sequence #315
Resources
Something like ESC ) B
(vtm terminal supports UTF-8 only)
printf "\e)B"
It would be nice to demonstrate the handling of unicode characters of different widths (wide/narrow) in text, rather than just narrow text in a multiplexer environment.
For example, show a few paragraphs of Japanese Wikipedia text, as well as a couple of paragraphs about emoji.
Example
Some examples of emoji are 😃, 😭, and 😈.
端末エミュレータ
出典: フリー百科事典『ウィキペディア(Wikipedia)』
Not implemented.
The current SGR attributes are not saved when using DECSC/DECRC
(ESC 7/8
).
Make the following aspects configurable
CSI 24 : n : m p
int32_t
n
Buffer limit in lines, 0 is unlimited, default is 20.000m
Grow step for unlimited buffer, default is 0The main menu can be configured in the ~/.config/vtm/settings.xml
file in xml format.
The top-level element <config selected=_selected_id_>
contains a list of
<menuitem ... />
<splitter ... />
<defaults ... />
.The value of the selected=
attribute specifies which menu item will be selected by default at startup.
The list of main menu items can be extended using the VTM_CONFIG=...
environment variable. This variable should contain a list of items as inside the <config selected=_selected_id_> ... </config>
block.
Arguments can be specified without quotes if there are no spaces in the string.
\e
ASCII 0x1B ESC\t
ASCII 0x09 TAB\a
ASCII 0x07 BEL\n
ASCII 0x0A LF\\
ASCII 0x5C Backslash\"
ASCII 0x22 Quotes\'
ASCII 0x27 Single quote$0
Current module full pathAttribute | Description | Value type | Mandatory | Default value |
---|---|---|---|---|
id |
Menu item textual identifier | string |
required | |
index |
Menu item zero-based index | index |
||
alias |
Use existing menu item specified by id as template |
string |
||
hidden |
Menu item visibility | boolean |
no |
|
label |
Menu item label text | string |
=id |
|
notes |
Menu item tooltip text | string |
empty | |
title |
Object window title | string |
empty | |
footer |
Object window footer | string |
empty | |
bgcolor |
Object window background color | RGBA |
||
fgcolor |
Object window foreground color | RGBA |
||
winsize |
Object window 2D size | x;y |
||
wincoor |
Object window 2D coor | x;y |
||
slimmenu |
Object window menu vertical size | boolean |
no |
|
hotkey |
Keyboard shortcut (Modifier1+[Mod...+][ModN...+]Key) | string |
||
cwd |
Current working directory | string |
||
type |
Object type | string |
SHELL |
|
cmd |
Object constructor arguments | string |
empty |
DirectVT
, cmd: _command line_
SHELL
, cmd: _command line_
ANSIVT
, cmd: _command line_
Group
, cmd: [ v[n:m:w] | h[n:m:w] ] ( id_1 | _nested_block_ , id_2 | _nested_block_ )]
Region
, cmd
attribute is not used, use title
to set region name~/.config/vtm/settings.xml
<config selected=Term>
<splitter label="apps"/>
<defaults index=-1 hidden=no slimmenu=false type=SHELL fgcolor=#00000000 bgcolor=#00000000 winsize=0x0 wincoor=0x0 />
<menuitem id=Term index=1 label="Term" bgcolor=#0a0a0a fgcolor=15 slimmenu notes="$0 -r Term:\nTerminal emulator" type=DirectVT cmd="vtm -r term bash"/>
<menuitem id=mc label="mc" title="mc" notes="Midnight Commander" type=SHELL cmd="mc"/>
<menuitem id=Settings index=2 label="Settings \e[45mLink\e[m" title="Settings title" footer="\e[11:2psettings status" fgcolor=15 bgcolor=0xFF562401 notes="$0\n\tRun settings" type=DirectVT cmd="vtm -r settings"/>
<menuitem id=View label=View notes="Set desktop region" type=Region title="\e[11:3pView: Region"/>"
<splitter label="groups"/>
<menuitem id=Tile1 label="Tile" notes="Tiling window manager" type=Group cmd="h(Term, v(mc, Term))"/>
<menuitem id=Tile2 label="Second TWM"
notes="Tooltip for Tiling window manager"
type=Group
cmd="h(v(Term, Tile1), v(mc, Term))"/>
// not ready yet
//<autorun>
// <mc wincoor=100,7 winsize=100,50 />
// <Term wincoor=40,12 winsize=100,50 />
// <Tile wincoor=15,1 winsize=100,50 />
//</autorun>
</config>
VTM_CONFIG=
envarVTM_CONFIG='<splitter label="envars" notes=" Menu items configured using envar VTM_CONFIG=... "/>
<menuitem id=Term2 notes="Run terminal" type=DirectVT label="Virtual \e[41mTerminal\e[m Emulator" cmd="$0 -r term"/>
<menuitem id=View2 label=View notes="Desktop region" type=Region title="Region 1"/>
<menuitem id=htop2 label=htop hidden=yes notes="htop app" type=ANSIVT cmd="htop"/>
<menuitem id=mc2 label=mc hidden=1 notes="mc app" type=SHELL cmd="mc"/>
<menuitem id=Tile2 label=Tile notes="Tiling Window Manager" type=Group title="Tiling Window Manager" cmd="h1:2( v1:1(htop2, mc2), Term2)"/>'
An alternative to ConPTY
The goal is to free the memory allocated by the application along with its termination.
Desktopio process can signal with OSC to use IPC instead of TTY (something like extended alternate screen).
The Linux console uses a standard 512-character VGA font that does not contain the glyphs needed to draw QR codes.
The following characters in this font can be replaced with minimal side effects:
VGA_FONT[10] = '•' U+2022 'BULLET'
'○' U+25cf 'BLACK CIRCLE'
0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0
░░░░░░░░░░░░░░░░1
░░░░░░░░░░░░░░░░2
░░░░░░░░░░░░░░░░3
░░░░░░░░░░░░░░░░4
░░░░░░░░░░░░░░░░5
░░░░░░░░░░░░░░░░6
░░░░██████░░░░░░7
░░██████████░░░░8
░░██████████░░░░9
░░██████████░░░░a
░░░░██████░░░░░░b
░░░░░░░░░░░░░░░░c
░░░░░░░░░░░░░░░░d
░░░░░░░░░░░░░░░░e
░░░░░░░░░░░░░░░░f
VGA_FONT[211] = '∙' U+2219 'BULLET OPERATOR'
0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0
░░░░░░░░░░░░░░░░1
░░░░░░░░░░░░░░░░2
░░░░░░░░░░░░░░░░3
░░░░░░░░░░░░░░░░4
░░░░░░░░░░░░░░░░5
░░░░░░░░░░░░░░░░6
░░░░░░████░░░░░░7
░░░░████████░░░░8
░░░░████████░░░░9
░░░░░░████░░░░░░a
░░░░░░░░░░░░░░░░b
░░░░░░░░░░░░░░░░c
░░░░░░░░░░░░░░░░d
░░░░░░░░░░░░░░░░e
░░░░░░░░░░░░░░░░f
VGA_FONT[254] = '■' U+25a0 'BLACK SQUARE'
'▯' U+25ae 'BLACK VERTICAL RECTANGLE'
0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0
░░░░░░░░░░░░░░░░1
░░░░░░░░░░░░░░░░2
░░░░░░░░░░░░░░░░3
░░░░░░░░░░░░░░░░4
░░░░░░░░░░░░░░░░5
░░░░░░░░░░░░░░░░6
░░████████████░░7
░░████████████░░8
░░████████████░░9
░░████████████░░a
░░████████████░░b
░░████████████░░c
░░░░░░░░░░░░░░░░d
░░░░░░░░░░░░░░░░e
░░░░░░░░░░░░░░░░f
Note that VGA_FONT[10]
and VGA_FONT[211]
are very similar. They can be combined.
VGA_FONT[254]
is similar to U+2584 '▄' 'LOWER HALF BLOCK'.
As a result, it is possible to get:
VGA_FONT[10] = U+2580 '▀' 'UPPER HALF BLOCK'
(redrawn)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0 ████████████████0
░░░░░░░░░░░░░░░░1 ████████████████1
░░░░░░░░░░░░░░░░2 ████████████████2
░░░░░░░░░░░░░░░░3 ████████████████3
░░░░░░░░░░░░░░░░4 ████████████████4
░░░░░░░░░░░░░░░░5 ████████████████5
░░░░░░░░░░░░░░░░6 ████████████████6
░░░░██████░░░░░░7 ████████████████7
░░██████████░░░░8 => ░░░░░░░░░░░░░░░░8
░░██████████░░░░9 ░░░░░░░░░░░░░░░░9
░░██████████░░░░a ░░░░░░░░░░░░░░░░a
░░░░██████░░░░░░b ░░░░░░░░░░░░░░░░b
░░░░░░░░░░░░░░░░c ░░░░░░░░░░░░░░░░c
░░░░░░░░░░░░░░░░d ░░░░░░░░░░░░░░░░d
░░░░░░░░░░░░░░░░e ░░░░░░░░░░░░░░░░e
░░░░░░░░░░░░░░░░f ░░░░░░░░░░░░░░░░f
VGA_FONT[211] = '∙' U+2219 'BULLET OPERATOR'
'•' U+2022 'BULLET'
'○' U+25cf 'BLACK CIRCLE'
0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0
░░░░░░░░░░░░░░░░1
░░░░░░░░░░░░░░░░2
░░░░░░░░░░░░░░░░3
░░░░░░░░░░░░░░░░4
░░░░░░░░░░░░░░░░5
░░░░░░░░░░░░░░░░6
░░░░░░████░░░░░░7
░░░░████████░░░░8
░░░░████████░░░░9
░░░░░░████░░░░░░a
░░░░░░░░░░░░░░░░b
░░░░░░░░░░░░░░░░c
░░░░░░░░░░░░░░░░d
░░░░░░░░░░░░░░░░e
░░░░░░░░░░░░░░░░f
VGA_FONT[254] = '■' U+25a0 'BLACK SQUARE'
'▯' U+25ae 'BLACK VERTICAL RECTANGLE'
'▄' U+2584 'LOWER HALF BLOCK'
(redrawn)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
░░░░░░░░░░░░░░░░0 ░░░░░░░░░░░░░░░░0
░░░░░░░░░░░░░░░░1 ░░░░░░░░░░░░░░░░1
░░░░░░░░░░░░░░░░2 ░░░░░░░░░░░░░░░░2
░░░░░░░░░░░░░░░░3 ░░░░░░░░░░░░░░░░3
░░░░░░░░░░░░░░░░4 ░░░░░░░░░░░░░░░░4
░░░░░░░░░░░░░░░░5 ░░░░░░░░░░░░░░░░5
░░░░░░░░░░░░░░░░6 ░░░░░░░░░░░░░░░░6
░░████████████░░7 => ░░░░░░░░░░░░░░░░7
░░████████████░░8 ████████████████8
░░████████████░░9 ████████████████9
░░████████████░░a ████████████████a
░░████████████░░b ████████████████b
░░████████████░░c ████████████████c
░░░░░░░░░░░░░░░░d ████████████████d
░░░░░░░░░░░░░░░░e ████████████████e
░░░░░░░░░░░░░░░░f ████████████████f
In a desktop session with multiple users, when one takes the keyboard focus and disconnects from the desktop, the focus remains captured until any keyboard event is fired.
When the demo starts under mc (MidnightCommander), the mouse is tracked braked, especially double and simultaneous clicks with the cursor moving.
Apparently mc delays the transfer of STDIN while waiting for a double click.
It's better to run the demo without intermediaries like mc.
Most Linux terminals support at least 16-color palette (including THE linux console). The actual colors in this palette may be redefined freely from full 24-bit palette using appropriate escape sequences, and using websites that aid this process, such as terminal.sexy.
There are many programs using only 16-color palette, such as vim, mc, tmux. Amost anything based on curses..
Since vtm uses full color palette internally, it has some sort of defaults specified for that 16-color palette. I don't like them. Blue is too dark and I can barely see anything when redshift activates.
I have my terminal configured with better suited colors for my needs. Unfortunately, as far as I'm aware, software has no way of reading these settings back from the terminal, not without terminal-specific hacks.
The best solution I could think of is letting a user define 16-color palette in vtm settings.
Even better, vtm could scan .bashrc for any terminal color changing mechanisms and learn these settings, as this is by far the most usual place to apply them. Alas, this is not failproof and would probably need a lot of work.
Some time ago I tried helping with virtual terminal implementation for notcurses, that's where I learned this and that about terminals. Unfortunately I proved myself, yet again, that I'm not fluent enough in programming to be of any actual help.
Ahoj, I'm impressed :)
Already used to minimal Awesome wm, I really appreciate the tiling layouts (and the keyboard navigation, but you have an issue for that...). With tiling, vtm would blow my mind :D
I imagine I could use a simple shortcut to arrange the windows in a view into tiles so they fill the desktop area. It would be great to have a few layouts available or configurable.
repro:
CSI \r 34 m
or CSI 34 \r m
as \r CSI 34 m
Scrollback buffer structure can be optimized dramatically in memory usage.
Use [cell][string<char>][null]
... [cell][string<char>][null]
structure instead of string<cell>
to store scrollback lines.
When a window got focus in application mouse tracking modes, it should also allow mouse wheel events.
To reproduce simply run a CLI app, such as htop
, or vim
and try using mouse wheel. It does nothing.
For more info on mouse wheel support, see: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Wheel-mice
Tested terminals: xterm, gnome-terminal, kitty
Tested terminal widgets: vte, TerminalCtrl (Ultimate++ terminal widget)
Tested platform: Linux 5.10, Gnome 3.38.
Details #109 (reply in thread)
DL
CSI n M
doesn't work as expectedDECSEL
CSI n K
doesn't work at allShow the ability to share via ssh a working instance for any number of clients from any region.
Pay attention to
Shared access should be for all published applications.
Repro:
printf "\e[1000;7mnegative\n"
If some link is displayed in the multiplexer, it would be nice to allow it to be opened by clicking on it.
Link types
/dev/input/mice
meta deviceCSI n m
n:
Problem Description: Source tree says it's not ready.
Expected Behavior: There's code in the source tree that builds.
Maximize/restore windows by double click.
No keyboard navigation between windows.
Problem Description: When I do this (https://www.youtube.com/watch?v=Fm5X75sO62c) on the demo, it crashed my connection. It becomes unresponsive and then closes.
LeftDrag
LeftClick
to select a word
@
characterwhitespace
characterword
by clicking on any letterLeftClick
to select the entire paragraphAlt
keyCtrl
keyLeftClick
RightClick
(+Ctrl
to keep selection visible after copy)RightClick
Left+RightClick
anywhere=─ ─=─ ─=
Wrap
# Selection #
+ Plaintext +
! ANSI-text !
h_size : v_size
n rows ~m cells
DECSTBM
awareNot implemented.
Unsupport some keybindings on Windows.
Package managers
It would be nice to demonstrate some real applications, not just empty command shells in a multiplexer environment.
For example, show the real Midnight Commander, and a window with a recursive connection to itself, i.e. to the current multiplexer instance to demonstrate shared connectivity.
View only
ssh [email protected]
By design, the functionality of this multiplexer will have to include, in addition to a full-fledged terminal emulator, an API for launching and displaying applications written using the TermXS Framework, so I do not really like its one-sided initial name - the multiplexer, although the abbreviation is vtm - very convenient, it is short when you type it on the keyboard.
I have an idea to rename this project. Another name is monotty - such as one terminal for all needs: "mono + TTY".
In the future I plan to develop this project to the shell of the operating system - a terminal desktop with the possibility of shared multi-user SSH access, and the name Monotty for it I think will be just right. In this role, in addition to the functionality of the terminal multiplexer, monotty will provide both the display of applications written using the TermXS (since the project itself is based on this framework), as well as regular terminal applications.
Not an issue at all :)
This is the craziest most innovative stuff I've seen around terminals in a long time. This virtual desktop/views idea really lets you forget, that you are in a terminal emulator. It feels more like one of those assembly based OS with a fixed monospace font. 😸
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.