Giter Site home page Giter Site logo

mtm's Introduction

Introduction

mtm is the Micro Terminal Multiplexer, a terminal multiplexer in 550 lines (or 1050 lines if you count tmt.c, the terminal emulator component that is available separately).

The Obiligatory Screenshot

screenshot.png

Community

Rob posts updates about mtm on Twitter at http://twitter.com/TheKingAdRob.

Installation

Installation and configuration is fairly simple:

  • You need ncursesw. Other curses implementations might work, but have not been tested.
  • Edit the variables at the top of the Makefile if you need to (you probably don't).
  • Run make.
  • Run make install if desired.

Compatibility

One nice thing about mtm is that it emulates (accurately) an existing terminal type that is widely supported: mach and/or mach-color. This terminal emulation is actually implemented as a library, called libtmt, that you may find useful.

This means that mtm will work out-of-the-box on most systems, at least terminal-emulation-wise. There is generally no need to install a new termcap definition (assuming your existing termcap database has entries for mach/mach-color; most have for the past twenty years).

Anything that uses termcap/terminfo or (n)curses should "just work" with mtm. mtm does not, however, support some features that some programs want (and neither did the original mach/mach-color console). The only user-visible features that might be missed are terminal-title setting and mouse support. If you need those, mtm will not work for you, sorry.

Note that mtm also intentionally breaks compatibilty with the mach console by rendering blinking text as bold instead. This is because nobody likes blinking text, and it can actually be dangerous for some people with epilepsy and other conditions.

Usage

Usage is simple:

mtm [-m] [-c KEY] [-e MILLISECONDS]

The -m flag puts mtm in monochrome mode, if you need that.

The -c flag lets you specify a keyboard character to use as the "command prefix" for mtm when modified with control (see below). By default, this is g.

The -e flag specifies how long mtm will wait after seeing an escape character to see if it's the beginning of a special sequence.

Once inside mtm, things pretty much work like any other terminal. However, mtm lets you split up the terminal into multiple virtual terminals.

At any given moment, exactly one virtual terminal is focused. It is to this terminal that keyboad input is sent. The focused terminal is indicated by the location of the cursor.

The following commands are recognized in mtm, when preceded by the command prefix (by defaul ctrl-g):

Up/Down/Left/Right Arrow
Focus the virtual terminal above/below/to the left of/to the right of the currently focused terminal.
h / v
Split the focused virtual terminal in half horizontally/vertically. creating a new virtual terminal to the right/below. The new virtual terminal is focused.
w
Delete the focused virtual terminal. Some other nearby virtual terminal will become focused if there are any left. mtm will exit once all virtual terminals are closed. Virtual terminals will also close if the program started inside them exits.
l
Redraw the screen.

That's it. There aren't dozens of commands, there are no modes, there's nothing else to learn.

Copyright and License

Copyright 2017 Rob King <[email protected]>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

mtm's People

Contributors

deadpixi avatar julien avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.