Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orhun/kermit
A VTE-based, simple and froggy terminal emulator 🐸
https://github.com/orhun/kermit
gtk3 linux-terminal terminal terminal-emulator vte
Last synced: 27 days ago
JSON representation
A VTE-based, simple and froggy terminal emulator 🐸
- Host: GitHub
- URL: https://github.com/orhun/kermit
- Owner: orhun
- License: gpl-3.0
- Created: 2019-06-10T14:37:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T08:00:58.000Z (8 months ago)
- Last Synced: 2024-05-09T20:56:06.219Z (8 months ago)
- Topics: gtk3, linux-terminal, terminal, terminal-emulator, vte
- Language: C
- Homepage:
- Size: 225 KB
- Stars: 124
- Watchers: 5
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- fucking-Awesome-Linux-Software - ![Open-Source Software - A VTE-based, simple and froggy terminal emulator. (Applications / Terminal)
- Awesome-Linux-Software - ![Open-Source Software - A VTE-based, simple and froggy terminal emulator. (Applications / Terminal)
- awesome-terminals - kermit - A VTE-based, simple and froggy terminal emulator. (Uncategorized / Uncategorized)
README
# kermit [![Release](https://img.shields.io/github/release/orhun/kermit.svg?color=5B7C33&style=flat-square)](https://github.com/orhun/kermit/releases) [![AUR](https://img.shields.io/aur/version/kermit.svg?color=5B7C33&style=flat-square)](https://aur.archlinux.org/packages/kermit/)
### A VTE-based, simple and froggy terminal emulator.
![Kermit the Frog](https://user-images.githubusercontent.com/24392180/59636824-2af20180-915d-11e9-95dd-0a077ebc3cfa.gif)
[VTE](https://developer.gnome.org/vte/) is a [GTK](https://developer.gnome.org/gtk3/3.0/) widget that is designed to create virtual terminal emulators. [GNOME Terminal](https://help.gnome.org/users/gnome-terminal/stable/), [ROXTerm](https://github.com/realh/roxterm) and [evilvte](http://www.calno.com/evilvte/) are a few examples of terminal emulators that use the VTE widget. With the case of kermit, although it is a "yet another" VTE implementation, it aims to keep everything simple and customizable while providing some additional features.
The project is inspired by [Vincent Bernat](https://vincent.bernat.ch/en)'s [article](https://vincent.bernat.ch/en/blog/2017-write-own-terminal) and also his [implementation](https://github.com/vincentbernat/vbeterm) of a custom VTE-based terminal. Terminal features and appearance are mostly influenced by [Rxvt](https://wiki.archlinux.org/index.php/Rxvt-unicode), [termite](https://github.com/thestinger/termite) and [st](https://st.suckless.org/).
Table of Contents
- [Installation](#installation)
- [AUR](#aur)
- [CMake](#cmake)
- [Make](#make)
- [GCC](#gcc)
- [Features](#features)
- [Arguments](#arguments)
- [Default Key Bindings](#default-key-bindings)
- [Customization](#customization)
- [Config File](#config-file)
- [Theme](#theme)
- [Font](#font)
- [Key Bindings](#key-bindings)
- [Padding](#padding)
- [Screenshots](#screenshots)
- [TODO(s)](#todos)
- [License](#license)
- [Copyright](#copyright)## Installation
### AUR
- [kermit](https://aur.archlinux.org/packages/kermit/)
- [kermit-git](https://aur.archlinux.org/packages/kermit-git/)### CMake
```
mkdir -p build && cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
sudo ldconfig
```### Make
```
make
sudo make install
```### GCC
```
cd src/
gcc -s -O3 -Wall -Wno-deprecated-declarations $(pkg-config --cflags vte-2.91) kermit.c -o kermit.o $(pkg-config --libs vte-2.91)
```\* `kermit` depends on [vte3](https://www.archlinux.org/packages/extra/x86_64/vte3/) and [gtk3](https://www.archlinux.org/packages/extra/x86_64/gtk3/) packages.
## Features
- Uses the default shell (`$SHELL`)
- Supports transparency with a composite manager (such as [compton](https://github.com/chjj/compton))
- Supports base16 color schemes (customizable theme)
- Supports custom keys and associated commands
- Supports tabs## Arguments
```
kermit [-h] [-v] [-d] [-c config] [-t title] [-w workdir] [-e command][-h] shows help
[-v] shows version
[-d] enables the debug messages
[-c config] specifies the configuration file
[-t title] sets the terminal title
[-w workdir] sets the working directory
[-e command] sets the command to execute in terminal
```## Default Key Bindings
| Key | Action |
| -------------------------------------- | --------------------------------- |
| `ctrl` + `alt` + `c` | Copy to clipboard |
| `ctrl` + `alt` + `v` | Paste from clipboard |
| `ctrl` + `alt` + `t`/`return` | Open a new tab |
| `ctrl` + `alt` + `n` | Open a new window |
| `ctrl` + `alt` + `r` | Reload configuration file |
| `ctrl` + `alt` + `d` | Load default configuration |
| `ctrl` + `alt` + `q` | Exit the terminal |
| `ctrl` + `alt` + `k`/`up` | Increase font size |
| `ctrl` + `alt` + `j`/`down` | Decrease font size |
| `ctrl` + `alt` + `equals`/`plus` | Reset font size to default |
| `ctrl` + `alt` + `` | Switch to tab with number `` |
| `ctrl` + `alt` + `l`/`right`/`pageup` | Switch to next tab |
| `ctrl` + `alt` + `h`/`left`/`pagedown` | Switch to previous tab |
| `ctrl` + `alt` + `backspace` | Close the current tab |The default modifiers (`ctrl` + `alt`) can be set to `ctrl` + `shift` using the config file.
Key bindings can be overridden by custom key bindings.
See [Configuration / Key Bindings](#key-bindings) for more information.## Customization
### Config File
Most of the settings including font, opacity and colors can be changed via the config file. The default configuration file is available [here](https://github.com/orhun/kermit/blob/master/.config/kermit.conf).
`kermit` looks for configuration file in `~/.config/kermit.conf`
### Theme
The terminal theme can be changed by either editing the config file manually or using the [base16](https://github.com/chriskempson/base16) color schemes in [orhun/base16-kermit](https://github.com/orhun/base16-kermit) repository.
### Font
`kermit` uses a [PangoFontDescription](https://developer.gnome.org/pygtk/stable/class-pangofontdescription.html) which is retrieved from the `kermit.conf` for changing the font family, style and size. The configuration entry format of the font and some examples are shown below and the default value is `monospace 9`.
```
font [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]
````FAMILY-LIST` is a comma-separated list of families optionally terminated by a comma, `STYLE_OPTIONS` is a whitespace-separated list of words where each WORD describes one of style, variant, weight, or stretch, and `SIZE` is a decimal number (size in points).
• Available font families: `Normal, Sans, Serif and Monospace`.
• Available styles: `Normal, Oblique, Italic`.
• Available weights: `Ultra-Light, Light, Normal, Bold,Ultra-Bold, Heavy`.
• Available variants: `Normal, Small-Caps`.
• Available stretch styles: `Ultra-Condensed, Extra-Condensed, Condensed, Semi-Condensed, Normal, Semi-Expanded, Expanded, Extra-Expanded, Ultra-Expanded`.Examples:
```
font sans bold 12
font normal 10
font monospace bold italic condensed 12
```### Key Bindings
Custom keys and associated commands can be specified with the configuration file. An example entry is available [here](https://github.com/orhun/kermit/blob/master/.config/kermit.conf#L14) and entry format is shown below.
```
bind/bindx/bindi [KEY]~"[COMMAND]"
```- bind: `Send command to the terminal.`
- bindx: `Send command to the terminal and execute.`
- bindi: `Execute internal command`Examples:
```
bindx f~"df -h"
bind r~"rm -i "
bind p~"ps aux | grep "
bind k~"kill -9 "
bindi c~"copy"
```Currently available internal commands (`bindi`):
- `copy`: copy to clipboard
- `paste`: paste from clipboard
- `reload-config`: reload config
- `default-config`: load default config
- `new-tab`: open new tab
- `exit`: exit kermit
- `inc-font-size`: increase font size by 1
- `dec-font-size`: decrease font size by 1
- `default-font-size`: reset font size to default
- `next-tab`: go to next tab
- `prev-tab`: go to previous tab
- `close-tab`: close current tab
- `new-window`: open new window with same working directory (requires `vte.sh`).### Padding
In order to change the padding of the terminal, create `~/.config/gtk-3.0/gtk.css` if it does not exist, specify the values there and restart the terminal.
```css
VteTerminal,
TerminalScreen,
vte-terminal {
padding: 3px 2px 2px 1px;
}
```The command below can be used to create the both configuration files.
```bash
curl https://raw.githubusercontent.com/orhun/kermit/master/.config/kermit.conf --output ~/.config/kermit.conf && \
printf "VteTerminal,\nTerminalScreen,\nvte-terminal {\n\tpadding: 3px 2px 2px 1px;\n}\n" > ~/.config/gtk-3.0/gtk.css
```## Screenshots
![Screenshot](https://user-images.githubusercontent.com/24392180/87167894-5a2e6000-c2d6-11ea-9c99-fa05cf56f40b.gif)
## TODO(s)
- URL handling
## License
GNU General Public License v3.0 only ([GPL-3.0-only](https://www.gnu.org/licenses/gpl.txt))
## Copyright
Copyright © 2019-2024, [Orhun Parmaksız](mailto:[email protected])