{"id":13438122,"url":"https://github.com/deadpixi/mtm","last_synced_at":"2025-05-15T23:03:55.889Z","repository":{"id":17625325,"uuid":"82360979","full_name":"deadpixi/mtm","owner":"deadpixi","description":"Perhaps the smallest useful terminal multiplexer in the world.","archived":false,"fork":false,"pushed_at":"2024-07-18T01:03:39.000Z","size":1035,"stargazers_count":1137,"open_issues_count":40,"forks_count":55,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-05-10T00:34:22.286Z","etag":null,"topics":["c","console-app","console-application","multiplexer","terminal","terminal-emulators"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deadpixi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-18T04:22:36.000Z","updated_at":"2025-05-08T03:46:28.000Z","dependencies_parsed_at":"2024-12-20T02:01:28.485Z","dependency_job_id":null,"html_url":"https://github.com/deadpixi/mtm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadpixi%2Fmtm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadpixi%2Fmtm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadpixi%2Fmtm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadpixi%2Fmtm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadpixi","download_url":"https://codeload.github.com/deadpixi/mtm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","console-app","console-application","multiplexer","terminal","terminal-emulators"],"created_at":"2024-07-31T03:01:03.049Z","updated_at":"2025-05-15T23:03:55.850Z","avatar_url":"https://github.com/deadpixi.png","language":"C","readme":"Introduction\n============\n\nmtm is the Micro Terminal Multiplexer, a terminal multiplexer.\n\nIt has four major features/principles:\n\nSimplicity\n    There are only a few commands, two of which are hardly ever used.\n    There are no modes, no dozens of commands, no crazy feature list.\n\nCompatibility\n    mtm emulates a classic ANSI text terminal.  That means it should\n    work out of the box on essentially all terminfo/termcap-based systems\n    (even pretty old ones), without needing to install a new termcap entry.\n\nSize\n    mtm is small.\n    The entire project is around 1000 lines of code.\n\nStability\n    mtm is \"finished\" as it is now.  You don't need to worry about it\n    changing on you unexpectedly.  The only changes that can happen at\n    this point are:\n\n    - Bug fixes.\n    - Translation improvements.\n    - Accessibility improvements.\n    - Fixes to keep it working on modern OSes.\n\nCommunity\n=========\n\nRob posts updates about mtm on Twitter at http://twitter.com/TheKingAdRob.\n\nInstallation\n============\nInstallation and configuration is fairly simple:\n\n- You need ncursesw.\n  If you want to support terminal resizing, ncursesw needs to be\n  compiled with its internal SIGWINCH handler; this is true for most\n  precompiled distributions.  Other curses implementations might work,\n  but have not been tested.\n- Edit the variables at the top of the Makefile if you need to\n  (you probably don't).\n- If you want to change the default keybindings or other compile-time flags,\n  copy `config.def.h` to `config.h` and edit the copy. Otherwise the build\n  process will use the defaults.\n- Run::\n\n    make\n\n  or::\n\n    make CURSESLIB=curses\n\n  or::\n\n    make HEADERS='-DNCURSESW_INCLUDE_H=\"\u003cncurses.h\u003e\"'\n\n  whichever works for you.\n- Run `make install` if desired.\n\nUsage\n=====\n\nUsage is simple::\n\n    mtm [-T NAME] [-t NAME] [-c KEY]\n\nThe `-T` flag tells mtm to assume a different kind of host terminal.\n\nThe `-t` flag tells mtm what terminal type to advertise itself as.\nNote that this doesn't change how mtm interprets control sequences; it\nsimply controls what the `TERM` environment variable is set to.\n\nThe `-c` flag lets you specify a keyboard character to use as the \"command\nprefix\" for mtm when modified with *control* (see below).  By default,\nthis is `g`.\n\nOnce inside mtm, things pretty much work like any other terminal.  However,\nmtm lets you split up the terminal into multiple virtual terminals.\n\nAt any given moment, exactly one virtual terminal is *focused*.  It is\nto this terminal that keyboad input is sent.  The focused terminal is\nindicated by the location of the cursor.\n\nThe following commands are recognized in mtm, when preceded by the command\nprefix (by default *ctrl-g*):\n\nUp/Down/Left/Right Arrow\n    Focus the virtual terminal above/below/to the left of/to the right of\n    the currently focused terminal.\n\no\n    Focus the previously-focused virtual terminal.\n\nh / v\n    Split the focused virtual terminal in half horizontally/vertically,\n    creating a new virtual terminal to the right/below.  The new virtual\n    terminal is focused.\n\nw\n    Delete the focused virtual terminal.  Some other nearby virtual\n    terminal will become focused if there are any left.  mtm will exit\n    once all virtual terminals are closed.  Virtual terminals will also\n    close if the program started inside them exits.\n\nl\n    Redraw the screen.\n\nPgUp/PgDown/End\n    Scroll the screen back/forward half a screenful, or recenter the\n    screen on the actual terminal.\n\nThat's it.  There aren't dozens of commands, there are no modes, there's\nnothing else to learn.\n\n(Note that these keybindings can be changed at compile time.)\n\nScreenshots\n-----------\nmtm running three instances of `tine \u003chttps://github.com/deadpixi/tine\u003e`_\n\n.. image:: screenshot2.png\n\nmtm running various other programs\n\n.. image:: screenshot.png\n\nmtm showing its compatibility\n\n.. image:: vttest1.png\n.. image:: vttest2.png\n\nCompatibility\n=============\n(Note that you only need to read this section if you're curious.  mtm should\njust work out-of-the-box for you, thanks to the efforts of the various\nhackers over the years to make terminal-independence a reality.)\n\nBy default, mtm advertises itself as a `screen-bce` terminal.  This is what `GNU\nscreen` and `tmux` advertise themselves as, and is a well-known terminal\ntype that has been in the default terminfo database for decades.\n\n(Note that this should not be taken to imply that anyone involved in the\n`GNU screen` or `tmux` projects endorses or otherwise has anything to do\nwith mtm, and vice-versa. Their work is excellent, though, and you should\ndefinitely check it out.)\n\nThe (optional!) `mtm` Terminal Types\n------------------------\nmtm comes with a terminfo description file called mtm.ti.  This file\ndescribes all of the features supported by mtm.\n\nIf you want to install this terminal type, use the `tic` compiler that\ncomes with ncurses::\n\n    tic -s -x mtm.ti\n\nor simply::\n\n    make install-terminfo\n\nThis will install the following terminal types:\n\nmtm\n    This terminal type supports all of the features of mtm, but with\n    the default 8 \"ANSI\" colors only.\n\nmtm-256color\n    Note that mtm is not magic and cannot actually display more colors\n    than the host terminal supports.\n\nmtm-noutf\n    This terminal type supports everything the mtm terminal type does,\n    but does not advertise UTF8 capability.\n\nThat command will compile and install the terminfo entry.  After doing so,\ncalling mtm with `-t mtm`::\n\n    mtm -t mtm\n\nwill instruct programs to use that terminfo entry.\nYou can, of course, replace `mtm` with any of the other above terminal\ntypes.\n\nUsing these terminfo entries allows programs to use the full power of mtm's\nterminal emulation, but it is entirely optional. A primary design goal\nof mtm was for it to be completely usable on systems that didn't have the\nmtm terminfo entry installed. By default, mtm advertises itself as the\nwidely-available `screen-bce` terminal type.\n\nCopyright and License\n=====================\n\nCopyright 2016-2019 Rob King \u003cjking@deadpixi.com\u003e\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n","funding_links":[],"categories":["C","HarmonyOS","Recommendations for Other Tools","\u003ca name=\"terminal\"\u003e\u003c/a\u003eTerminals"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadpixi%2Fmtm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadpixi%2Fmtm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadpixi%2Fmtm/lists"}