All Projects → agatan → termfest

agatan / termfest

Licence: MIT License
Easy TUI library written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to termfest

golintui
A simple terminal UI for Go linters
Stars: ✭ 73 (+356.25%)
Mutual labels:  tui
uncursed
A blessed fixed greased +3 terminal library
Stars: ✭ 23 (+43.75%)
Mutual labels:  tui
checkbox.sh
Interactive checkboxes (menu) with pagination and vim keybinds for bash
Stars: ✭ 26 (+62.5%)
Mutual labels:  tui
shy
💀 bare-bones ssh launcher
Stars: ✭ 51 (+218.75%)
Mutual labels:  tui
tui-netcore
Text User Interface for .net Core.
Stars: ✭ 20 (+25%)
Mutual labels:  tui
circumflex
🌿 It's Hacker News in your terminal
Stars: ✭ 43 (+168.75%)
Mutual labels:  tui
flinch
A collection of terminal-based widgets for richer Golang CLI apps.
Stars: ✭ 32 (+100%)
Mutual labels:  tui
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (+37.5%)
Mutual labels:  tui
RecoverPy
🙈 Interactively find and recover deleted or 👉 overwritten 👈 files from your terminal
Stars: ✭ 189 (+1081.25%)
Mutual labels:  tui
revi
A modal text editor inspired by Vim, Neovim and others like it.
Stars: ✭ 27 (+68.75%)
Mutual labels:  tui
gocket
💼 CLI / TUI for Pocket
Stars: ✭ 39 (+143.75%)
Mutual labels:  tui
croatoan
Common Lisp bindings for the ncurses terminal library.
Stars: ✭ 111 (+593.75%)
Mutual labels:  tui
tmbasic
TMBASIC programming language
Stars: ✭ 33 (+106.25%)
Mutual labels:  tui
paruz
A fzf terminal UI for paru or pacman
Stars: ✭ 29 (+81.25%)
Mutual labels:  tui
pexpo
💻 Terminal sending ping tool written in Go.
Stars: ✭ 89 (+456.25%)
Mutual labels:  tui
jira-cli
🔥 [WIP] Feature-rich interactive Jira command line.
Stars: ✭ 809 (+4956.25%)
Mutual labels:  tui
TUI
Terminal user interface library. Works on *NIX and Windows systems
Stars: ✭ 32 (+100%)
Mutual labels:  tui
cpass
An urwid based TUI front end for pass, the standard unix password manager.
Stars: ✭ 17 (+6.25%)
Mutual labels:  tui
vtm
Terminal multiplexer with window manager and session sharing
Stars: ✭ 924 (+5675%)
Mutual labels:  tui
YouPlot
A command line tool that draw plots on the terminal.
Stars: ✭ 412 (+2475%)
Mutual labels:  tui

termfest

Build Status

termfest is a thread-safe TUI library that provides simple APIs to render texts in terminal, heavily inspired by nsf/termbox-go. Currently, termfest doesn't support windows because of my poor windows experience.

termfest has internal buffer for efficient rendering. Applications can render everything to the buffer every time, and termfest flushes the buffer and renders only the difference between the terminal state and the buffer.

use termfest::{Termfest, Event};
use termfest::attr::*;
use termfest::key::*;

// first, initialize termfest.
let (fest, events) = Termfest::hold().unwrap();

let mut y = 0;

// events is a receiver of a channel that accepts terminal events like key input.
for ev in events.iter() {
    {
        // lock the screen.
        let mut screen = fest.lock_screen();
        // clear the buffer. you can render everything every time.
        // termfest can provide efficient rendering.
        screen.clear();
        // write to the buffer.
        let attr = Attribute { fg: Color::Red, ..Attribute::default() };
        screen.print(0, y, "Hello, world!", attr);
        // when the screen lock is released, the buffer is flushed.
        // (you can flush the buffer with explicit `flush` call.)
    }
    match ev {
        Event::Key(ESC) | Event::Char('q') => break,
        Event::Key(ArrowUp) => if y > 0 { y -= 1; },
        Event::Key(ArrowDown) => y += 1,
        _ => {}
    }
}

See examples for more detail.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].