Skip to main content

A simple command-line utility for changing your terminal colors

Project description

tsty

tsty short for "terminal style"

A simple command-line utility for quickly switching your terminal's background, text, and cursor colors.

Works in any terminal that honors the standard OSC 10/11/12 escape sequences, including:

  • Ghostty
  • kitty
  • Alacritty
  • WezTerm
  • iTerm2
  • macOS Terminal.app
  • foot, and other modern terminals

When run inside tmux or screen, sequences are automatically wrapped in the appropriate DCS passthrough envelope.

Example usage

# Change background to green
tsty bg green

## by default, the tsty command runs the `bg` subcommand, so this works too:
tsty green

## you can also pass in rgb values, in order of: r g b
tsty 0 100

# Change text color to orange
tsty text orange

# change cursor to lavender
tsty cursor lavender

# reset to sensible defaults
tsty reset

# list commands and colors
tsty list

Current status

  • Cross-terminal: works anywhere OSC 10/11/12 is supported (Ghostty, kitty, Alacritty, WezTerm, iTerm2, Terminal.app, ...)
  • tmux / screen passthrough handled automatically

TODOS

  • Add ability to switch themes
  • Make separate color presets for background/cursor and text, as the former generally needs to be darker and the latter brighter
  • make aliases, e.g. tsty t for tsty text
  • finish writing tests
    • throw error when user has more than 4 values for color argument
    • throw error when user has more than 1 non-numerical value for color argument
  • Replace verbose-by-default with --verbose opt-in flag (i.e. deprecate --quiet)

Installation and development notes

Install this tool using pip:

pip install tsty

Dev and Testing

# install locally
pip install -e .


# run all tests
pytest

# run just alpha tests
pytest -m 'alpha'


# skip alpha tests
pytest -m 'not alpha'

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

tsty-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

tsty-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file tsty-0.1.0.tar.gz.

File metadata

  • Download URL: tsty-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tsty-0.1.0.tar.gz
Algorithm Hash digest
SHA256 798db96262d19e010148ce5420063a6b995c466bd70b47c6c9be2a251511bee1
MD5 58184aea8a18fb3d1f931710e847ed00
BLAKE2b-256 fdb18b665772e0ae4bd833c4b850cca0ee5198e1edf4e06f1e8965bdc31dfe57

See more details on using hashes here.

File details

Details for the file tsty-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tsty-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tsty-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58ac3682c058be229e394382aab581b00b2d5b9391b6e8a16b17f91f71f97ed9
MD5 51772e3ba8940b0207fa38ee9f62abbd
BLAKE2b-256 e6f8962721c3a782afb9fe99a65de0204a9e0d615375624c5b55f195001deb0a

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