asitop icon indicating copy to clipboard operation
asitop copied to clipboard

UI broken in Ghostty terminal (xterm-ghostty not recognized)

Open anishgowda21 opened this issue 8 months ago • 2 comments

When running asitop inside Ghostty, the UI does not render properly compared to macOS Terminal.app.

Instead of the expected bordered/graph layout, large sections of the interface appear empty or misaligned.

Ghostty sets $TERM to xterm-ghostty, which blessed (the library asitop uses) seems unable to recognize.

Steps to Reproduce

  1. Install Ghostty terminal emulator
  2. run sudo asitop

Expected Behavior

UI should render properly (as in Terminal.app, iTerm2, etc.), with all borders and graphs visible.

Actual Behavior

Warning is shown:

'xterm-ghostty': unknown terminal type.
UserWarning: Failed to setupterm(kind='xterm-ghostty'): setupterm: could not find terminal

Environment

  • macOS 15.6.1

  • Chip: Apple M3 Pro

  • asitop: 0.0.24 (brew install asitop)

  • Python: 3.13

  • Ghostty: V1.1.3

Screenshot

Below screen shot shows the difference in both Terminal.app and Ghostty side by side

Image

anishgowda21 avatar Aug 26 '25 17:08 anishgowda21

As a quick fix, just delete the /tmp/asitop_powermetrics[XXX] file. I use sudo rm -f /tmp/asitop_powermetrics[XXX] (make sure to replace XXX) with the actual filename.

mercush avatar Oct 12 '25 23:10 mercush

Fix: TERM=xterm-256color sudo asitop Or

Put : term = xterm-256color in your ~/.config/ghostty/config file.

Mine shows like this now:

Image

69-PEAK avatar Nov 04 '25 12:11 69-PEAK