Vgmi
Vgmi is a gemini client with vim-like keybindings written in C, licensed under the ISC license.
Gemini protocol
Gemini is a new application-layer internet communication protocol introduced in 2019. The general purpose of a Gemini client is to send requests to Gemini capsules, usually listening on TCP port 1965, and rendering the server response, usally in gemtext. The Gemini protocol requires all communication to use TLS(a cryptographic protocol).
Vim-like keybindings
One of the goals of Vgmi was to allow navigating the geminispace using Vim keybindings. For example, pressing 'j' will scroll down and pressing 'k' will scroll up, pressing 'gt' will go to the next tab while pressing 'gT' will go to the previous. Those inputs can be repeated by preceding them with a number, typing '10j' will scroll down of 10 lines. Below is a demonstration of Vgmi, showing the keys that are being pressed by the user.
Images in the terminal
Vgmi can render images in the terminal by using the unicode character 'â–„'. The character is used to emulate a column of two pixels by setting the foreground and background colors. It is possible to emulate a screen of rather large pixels by covering the whole terminal with this unicode character with different colors. The color for a square is determined by first finding the average pixel color value covered by the square and then finding the closest color among the 256 standard Xterm colors that matches the average. The image bellow shows Vgmi rendering the default Windows XP wallpaper "Bliss" in a 80x24 terminal.
Sandboxing
To reduce the damage that a vulnerability could do, Vgmi uses sandboxing functionalities on some operating systems. Sandboxing is the concept of reducing the privileges and access of a program. When sandboxed, Vgmi no longer has access to the whole filesystem but only to the files necessary for the program to work. Sandboxing is also used to prevent Vgmi from using system calls that are not necessary for the expected behavior of the program.
Vgmi currently supports sandboxing on 4 operating systems :
- Linux, with seccomp(2) and landlock(7)
- FreeBSD, with capsicum(4) and cap_net(3)
- OpenBSD, with unveil(2) and pledge(2)
- Illumos, with privileges(7)
Supported platforms
Binaries available (x86-64)
Version 2.0
Version 1.5
Version 1.4
Version 1.3
Version 1.2
Version 1.1
Version 1.0
Version 0.9
Version 0.8
Vgmi can be compiled on Windows using cygwin.
The source code can be viewed online.
The repository can also be cloned with the following command:
git clone https://github.com/RealMelkor/Vgmi.git