Skip to main content

A tty for Textual UIs

Project description

textual-tty

A pure Python terminal emulator for Textual apps, that aims for tmux compatibility.

Currently lacks a cursor, any decent debugging tools, and is too chatty, but it's still somewhat usable.

Demo

uvx textual-tty

Usage

There's 3 main classes:

  1. Terminal, a standalone terminal that doesn't need Textual.
  2. TextualTerminal, a tty widget subclass.
  3. TerminalApp, a terminal emulator in a window.

Read the demo code for more info.

Links

License

WTFPL with one additional clause

  1. Don't blame me

Do wtf you want, but don't blame me when it rips a hole in your trousers.

todo / ideas

  • debug logger
    • make file logging optional
    • add arg parser to demo app
  • break terminal project out from Textual deps
    • pick a snazzy name
    • stdio -> pty wrapper
    • gui
      • make framebuffer.py
      • choose a backend
    • asciinema streaming -> terminal web
  • resizing oddities
    • htop doesn't resize properly
  • performance improvements
    • reduce draw calls
  • scrollback buffer
    • rewrite app so we have consistent + performant buffer class
    • understand text wrapping
    • scrollbar support when used
  • bugs
    • blank background to end of line
    • corruption in stream
    • scroll region: scroll up in vim corrupts outside scroll region
    • window titles not being set
  • testing
    • move tests
      • integration ./tests/integration
      • comparison scripts ./tests/integration/scripts
    • more coverage
  • reduce redundancy redundancy of repeated repeated code code
    • code code of of redundancy redundancy
  • add terminal visuals
    • text cursor
    • mouse cursor (disabled by default)
    • bell flash effect (enabled in base class, disabled in textual_terminal)
  • Theme support
    • base terminal using config + themes
    • textual widget using CSS styles
    • textual app using theme/css loader
  • flesh out terminal app
    • multiple tabs
    • settings panel
      • bell: system [Y/n], title bar [y/N], flash [y/N]
      • mouse: display [y/N]
      • wide chars detection
      • theme selector/editor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_tty-0.0.8.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_tty-0.0.8-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file textual_tty-0.0.8.tar.gz.

File metadata

  • Download URL: textual_tty-0.0.8.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for textual_tty-0.0.8.tar.gz
Algorithm Hash digest
SHA256 6ec304967c46cbc65b70ce4356df56c124ab27bc98261fc8e027ff1bbc677c7a
MD5 554b623477bb42806dad999ab2a41a8b
BLAKE2b-256 84b76658bef25f69a8491995a86776af4a1143530761dd8008052b81978d3161

See more details on using hashes here.

File details

Details for the file textual_tty-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: textual_tty-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for textual_tty-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c1db77b7c76ed487952fd5215487da354e9703d7e4e1f5cc61caf8d138a438e2
MD5 16e5fda15adced7a12a95678da2898ed
BLAKE2b-256 a2c5d32cd450a5b9f40252505c67a629876854d26468c18f59f8a1d9b78d2512

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page