zsh-users / antigen

The plugin manager for zsh.
http://antigen.sharats.me
MIT License
8.09k stars 280 forks source link

Switch theme based on Terminal Program? #704

Open vikas027 opened 4 years ago

vikas027 commented 4 years ago

Description

I am trying to use a different theme dynamically based on the Terminal program, iTerm.app or vscode in my use case.

I want to use theme bhilburn/powerlevel9k in iTerm and robbyrussell in VSCode. It looks like the if block in my .zshrc works but does not update the theme, it only automatically sets the theme which was set in the last instance of zsh.

Steps to reproduce

Minimal steps to reproduce this behavior.

1 - Open terminal
2 - check the theme in both iTerm and VSCode

Expected behavior:

- Theme should be `bhilburn/powerlevel9k` in iTerm and `robbyrussell` in VSCode

Software version

  ~  antigen version  
Antigen v2.2.3 (ff391b5)
Revision date: 2018-01-02 13:19:57 +0100
  ~  zsh --version                             
zsh 5.6.1 (x86_64-apple-darwin18.0.0)
  ~  uname -a
Darwin Vikass-MBP 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
  ~  

Configuration

if [[ "$TERM_PROGRAM" == "vscode" ]]; then antigen theme robbyrussell fi

vikas027 commented 4 years ago

Anyone?