Change zsh auto titles to hide user and host

oh-my-zshterminalzsh

Right now, when I open a zsh termite terminal the window title is

user@host: ~

Is there any way to remove the user@host part without entirely disabling auto titles?

If I enable DISABLE_AUTO_TITLE in my .zshrc then the window title is always termite. I want to just change the window title when I'm browsing directories so that it doesn't show the user and host – only the directory, but if, for example, I open nmtui I want the window title to automatically become nmtui instead of staying as termite.

Best Answer

Dug around a bit more and figured it out!

In my zsh theme (oh-my-via), I added this:

ZSH_THEME_TERM_TITLE_IDLE="%~"

which overrides the default value found here (ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~")

Related Question