Terminal Manipulation Kit
A simple C99 terminal manipulation library for C/C++ with features to manipulate terminal properties, styles and key readings targetting UTF-8 encoding. It is available for Windows, Linux and MacOS.
Designed to be an alternative to curses-like libraries, it offers a solid base for creating general purpose terminal based softwares, while leaving room to full-feature libraries to be built upon for more specific use cases.
The following dependencies must be installed before it:
- Visual Studio 2022 with the "Desktop development with C++" workload: it provides all the tools required to build this library.
- Git: it will be used to clone this repository.
- GCC, CMake: they will be used to build this library.
- Git: it will be used to clone this repository.
Tip
Use your distro package manager to install these packages.
- Apple Command Line Tools, CMake: they will be used to build this library.
- Git: it will be used to clone this repository.
Tip
Use xcode-select --install
to install the Apple command line tools. For the rest, use HomeBrew.
On Windows, using the Developer PowerShell for VS 2022
profile or, on any other operating systems, using any terminal, follow these instructions:
- In the root of your project, use
git
to add this library as a submodule:
git submodule add https://github.com/skippyr/libtmk libs/libtmk
- In your
CMakeLists.txt
file, add the library as a subdirectory (it will be targettmk
) and link it against your executable target, in this example, it will besrc/main.c
:
cmake_minimum_required(VERSION 3.20)
project(tmk-example)
add_subdirectory("${CMAKE_SOURCE_DIR}/libs/libtmk" "${CMAKE_BINARY_DIR}/libtmk")
add_executable(main "${CMAKE_SOURCE_DIR}/src/main.c")
target_link_libraries(main tmk)
- The next time you build your project, the library will be automatically linked into your executable.
After installed, you can learn how to use it by reading its documentation or by hovering your mouse pointer over any of its identifiers in your IDE.
If you need help related to this project, open a new issue in its issues pages or send me an e-mail describing what is going on.
This project is open to review and possibly accept contributions, specially fixes and suggestions. If you are interested, send your contribution to its pull requests page or to my e-mail.
In order to keep it open-source, by contributing to this project, you must agree to license your work under the same license that the project uses. For other intentions, prefer to create a fork.
This is free software licensed under the BSD-3-Clause License that comes WITH NO WARRANTY. Refer to the LICENSE
file that comes in its source code for license and copyright details.
≥v≥v Here Be Dragons! ≥v≥
Made with love by skippyr <3