1

I'm using agnoster theme on my terminal and it looks pretty bad when I need to use a tty.

Already tried this https://unix.stackexchange.com/a/581171 without sucess,

case $TERM in
  urxvt*)
    ZSH_THEME="agnoster";;
  *)
    ZSH_THEME="robbyrussell";;
esac

and this:

if [ "$TERM" = "urxvt" ]; then
    ZSH_THEME="agnoster"
else
    ZSH_THEME="robbyrussell"
fi

In both methods I get only the robbyrussell theme in urxvt and in tty, also tried some other things some weeks ago but can't remember the snippets of code.

1 Answer 1

1

Well, took me 4 days to realize that running $TERM in terminal would give me the answer.

if [ "$TERM" = "rxvt-unicode-256color" ]; then
    ZSH_THEME="agnoster"
else
    ZSH_THEME="robbyrussell"
fi

But I think that going this way bellow is even better if you end up changing your default terminal emulator or like doing "terminal-hopping"

if [ "$TERM" = "linux" ]; then
    ZSH_THEME="robbyrussell"
else
    ZSH_THEME="agnoster"
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .