Skip to content
/ libtmk Public

A simple C99 terminal manipulation library for C/C++ available for Windows, Linux and MacOS.

License

Notifications You must be signed in to change notification settings

skippyr/libtmk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

≥v≥v libtmk ≥v≥v

Terminal Manipulation Kit

     

❡ About

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.

❡ Install

Dependencies

The following dependencies must be installed before it:

Dependencies For Windows

  • Visual Studio 2022: it provides all the tools required to build this library.
  • git: it will be used to clone this repository.

Dependencies For Linux

  • 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.

Dependencies For MacOS

  • 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.

Procedures

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 target tmk) and link it against your executable target, in this example, it will be src/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.

❡ Documentation

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.

❡ Help

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.

❡ Contributing

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.

By contributing to this project, you agree to license your work under the same license that the project uses.

❡ License

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