Terminals

Each terminal represents an application rendering the shell’s output, and is associated with:

  • a unique terminal ID

  • a human-readable name

  • an icon (emoji / unicode character)

  • a detection function

  • various metadata in its info() method

Terminal usage

Each terminal is materialized by a Terminal object, from which you can access various metadata:

>>> from extra_platforms import KITTY
>>> KITTY
Terminal(id='kitty', name='Kitty')
>>> KITTY.id
'kitty'
>>> KITTY.current
False
>>> KITTY.info()
{'id': 'kitty', 'name': 'Kitty', 'icon': '🐱', 'url': 'https://sw.kovidgoyal.net/kitty/', 'current': False, 'version': None, 'color_support': None}

To check if the current environment is running in a specific terminal, use the corresponding detection function:

>>> from extra_platforms import is_kitty
>>> is_kitty()
False

The current terminal can be obtained via the current_terminal() function:

>>> from extra_platforms import current_terminal
>>> current_terminal()
Terminal(id='unknown_terminal', name='Unknown terminal')

Recognized terminals

Icon

Symbol

Name

Detection function

🔳

ALACRITTY

Alacritty

is_alacritty()

🍏

APPLE_TERMINAL

Apple Terminal

is_apple_terminal()

CONTOUR

Contour

is_contour()

🦶

FOOT

foot

is_foot()

👻

GHOSTTY

Ghostty

is_ghostty()

𝐆

GNOME_TERMINAL

GNOME Terminal

is_gnome_terminal()

📺

GNU_SCREEN

GNU Screen

is_gnu_screen()

HYPER

Hyper

is_hyper()

ITERM2

iTerm2

is_iterm2()

🐱

KITTY

Kitty

is_kitty()

💎

KONSOLE

Konsole

is_konsole()

🏞️

RIO

Rio

is_rio()

🐈

TABBY

Tabby

is_tabby()

🔀

TILIX

Tilix

is_tilix()

📟

TMUX

tmux

is_tmux()

🔵

VSCODE_TERMINAL

VS Code Terminal

is_vscode_terminal()

🔡

WEZTERM

WezTerm

is_wezterm()

WINDOWS_TERMINAL

Windows Terminal

is_windows_terminal()

𝐗

XTERM

xterm

is_xterm()

🪵

ZELLIJ

Zellij

is_zellij()

Hint

The UNKNOWN_TERMINAL trait represents an unrecognized terminal. It is not included in the ALL_TERMINALS group, and will be returned by current_terminal() if the current terminal is not recognized.

Groups of terminals

Icon

Symbol

Description

Detection

Canonical

💻

ALL_TERMINALS

All terminals

is_any_terminal()

🎮

GPU_TERMINALS

GPU-accelerated terminals

is_gpu_terminals()

MULTIPLEXERS

Terminal multiplexers

is_multiplexers()

NATIVE_TERMINALS

Native terminal emulators

is_native_terminals()

WEB_TERMINALS

Web-based terminals

is_web_terminals()

Hint

Canonical groups are non-overlapping groups that together cover all recognized traits. They are marked with a ⬥ icon in the table above.

Other groups are provided for convenience, but overlap with each other or with canonical groups.

        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

ALL_TERMINALS,NATIVE_TERMINALS,7
ALL_TERMINALS,GPU_TERMINALS,7
ALL_TERMINALS,WEB_TERMINALS,3
ALL_TERMINALS,MULTIPLEXERS,3
NATIVE_TERMINALS,APPLE_TERMINAL,1
NATIVE_TERMINALS,GNOME_TERMINAL,1
NATIVE_TERMINALS,ITERM2,1
NATIVE_TERMINALS,KONSOLE,1
NATIVE_TERMINALS,TILIX,1
NATIVE_TERMINALS,WINDOWS_TERMINAL,1
NATIVE_TERMINALS,XTERM,1
GPU_TERMINALS,ALACRITTY,1
GPU_TERMINALS,CONTOUR,1
GPU_TERMINALS,FOOT,1
GPU_TERMINALS,GHOSTTY,1
GPU_TERMINALS,KITTY,1
GPU_TERMINALS,RIO,1
GPU_TERMINALS,WEZTERM,1
WEB_TERMINALS,HYPER,1
WEB_TERMINALS,TABBY,1
WEB_TERMINALS,VSCODE_TERMINAL,1
MULTIPLEXERS,GNU_SCREEN,1
MULTIPLEXERS,TMUX,1
MULTIPLEXERS,ZELLIJ,1
    
        ---
config:
  mindmap:
    padding: 5

---
mindmap
    ((💻 ALL_TERMINALS))
        )⬢ WEB_TERMINALS(
            (⬡ HYPER)
            (🐈 TABBY)
            (🔵 VSCODE_TERMINAL)
        )▦ NATIVE_TERMINALS(
            (🍏 APPLE_TERMINAL)
            (𝐆 GNOME_TERMINAL)
            (⬛ ITERM2)
            (💎 KONSOLE)
            (🔀 TILIX)
            (⊡ WINDOWS_TERMINAL)
            (𝐗 XTERM)
        )⧉ MULTIPLEXERS(
            (📺 GNU_SCREEN)
            (📟 TMUX)
            (🪵 ZELLIJ)
        )🎮 GPU_TERMINALS(
            (🔳 ALACRITTY)
            (◰ CONTOUR)
            (🦶 FOOT)
            (👻 GHOSTTY)
            (🐱 KITTY)
            (🏞️ RIO)
            (🔡 WEZTERM)
    

Predefined terminals

Terminal definitions and metadata.

extra_platforms.ALACRITTY = Terminal(id='alacritty', name='Alacritty')
extra_platforms.APPLE_TERMINAL = Terminal(id='apple_terminal', name='Apple Terminal')
extra_platforms.CONTOUR = Terminal(id='contour', name='Contour')
extra_platforms.FOOT = Terminal(id='foot', name='foot')
extra_platforms.GHOSTTY = Terminal(id='ghostty', name='Ghostty')
extra_platforms.GNOME_TERMINAL = Terminal(id='gnome_terminal', name='GNOME Terminal')
extra_platforms.GNU_SCREEN = Terminal(id='gnu_screen', name='GNU Screen')
extra_platforms.HYPER = Terminal(id='hyper', name='Hyper')
extra_platforms.ITERM2 = Terminal(id='iterm2', name='iTerm2')
extra_platforms.KITTY = Terminal(id='kitty', name='Kitty')
extra_platforms.KONSOLE = Terminal(id='konsole', name='Konsole')
extra_platforms.RIO = Terminal(id='rio', name='Rio')
extra_platforms.TABBY = Terminal(id='tabby', name='Tabby')
extra_platforms.TILIX = Terminal(id='tilix', name='Tilix')
extra_platforms.TMUX = Terminal(id='tmux', name='tmux')
extra_platforms.UNKNOWN_TERMINAL = Terminal(id='unknown_terminal', name='Unknown terminal')
extra_platforms.VSCODE_TERMINAL = Terminal(id='vscode_terminal', name='VS Code Terminal')
extra_platforms.WEZTERM = Terminal(id='wezterm', name='WezTerm')
extra_platforms.WINDOWS_TERMINAL = Terminal(id='windows_terminal', name='Windows Terminal')
extra_platforms.XTERM = Terminal(id='xterm', name='xterm')
extra_platforms.ZELLIJ = Terminal(id='zellij', name='Zellij')