{"id":17686268,"url":"https://github.com/tale/trap2","last_synced_at":"2025-05-13T00:10:09.250Z","repository":{"id":206128749,"uuid":"713747204","full_name":"tale/trap2","owner":"tale","description":"A \"suckless-inspired\" GPU accelerated terminal","archived":false,"fork":false,"pushed_at":"2024-02-16T22:33:37.000Z","size":9178,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:09:53.319Z","etag":null,"topics":["glfw","opengl","vt220","vterm","xterm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"tale"}},"created_at":"2023-11-03T06:46:10.000Z","updated_at":"2025-03-24T22:09:38.000Z","dependencies_parsed_at":"2023-11-17T23:56:23.641Z","dependency_job_id":"719cb81b-be4d-4fec-9a3a-9aec8de564d6","html_url":"https://github.com/tale/trap2","commit_stats":null,"previous_names":["tale/trap2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tale%2Ftrap2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tale%2Ftrap2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tale%2Ftrap2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tale%2Ftrap2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tale","download_url":"https://codeload.github.com/tale/trap2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"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":["glfw","opengl","vt220","vterm","xterm"],"created_at":"2024-10-24T10:44:14.492Z","updated_at":"2025-05-13T00:10:09.115Z","avatar_url":"https://github.com/tale.png","language":"C","funding_links":["https://github.com/sponsors/tale"],"categories":[],"sub_categories":[],"readme":"# trap2\n\u003e A \"suckless-inspired\" GPU accelerated terminal emulator.\n\n`trap2` is a terminal emulator that uses the GPU to render the terminal.\nIt's built with OpenGL 3.3 Core Profile, GLFW 3, and `libvterm`, with a focus on simplicity and performance.\n\n### Future Goals\nThis is very much a work in progress, and I have a lot of ideas for the future:\n\n- [ ] Integrate clipboard support\n- [ ] Better testing harnesses\n\n### Rationale\nThe development of this terminal emulator ties closely to my CS367 Systems Engineering class at George Mason University.\nOne of the projects required me to implement a shell from scratch, so I decided to try and also build a basic terminal emulator.\nI've always been interested in terminal emulators, and I've always wanted to build one myself.\n\nThis is a learning project for me, so it will always be an amalgamation of new concepts and optimizations that I learn.\nYou can refer to these in the [doc](doc) folder, where I have most of the technical details and design decisions.\n\nThis leads into the 3 limitations that I'm defining for this project (subject to change):\n- No support for scrollback since I use [tmux](https://github.com/tmux/tmux) as my multiplexer\n- No support for mouse input since I don't use the mouse in the terminal\n- It'll really only be tested properly on macOS for now, this may change\n\n### Technical Details\n- The program uses `libvterm` to handle the terminal state machine\n- A multi-threaded GLFW setup is used to handle the input and rendering\n    - The main thread handles windowing and making rendering calls\n    - The `pty` thread handles reading the child fork output\n    - Minimal synchronization is needed or used to keep things fast\n- Rendering is done using `freetype2` and complex math to position glyphs\n\n### Building\nThe project uses [CMake](https://cmake.org/) as its build system. Install `cmake` and then run the following steps:\n\n0. Define a configuration file, see [doc/config.md](doc/config.md) for more details.\n1. `mkdir build \u0026\u0026 cd build`\n2. `cmake ..`\n3. `cd .. \u0026\u0026 cmake --build build --parallel`\n\nThis should produce a binary in your `build` folder which you can run with `./build/trap2`.\n\n\u003e Copyright (c) 2023, Aarnav Tale\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftale%2Ftrap2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftale%2Ftrap2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftale%2Ftrap2/lists"}