Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch theme based on Terminal Program? #704

Open
vikas027 opened this issue Mar 8, 2020 · 1 comment
Open

Switch theme based on Terminal Program? #704

vikas027 opened this issue Mar 8, 2020 · 1 comment

Comments

@vikas027
Copy link

vikas027 commented Mar 8, 2020

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

  • Snippet of zshrc
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
 antigen theme bhilburn/powerlevel9k powerlevel9k
fi

if [[ "$TERM_PROGRAM" == "vscode" ]]; then
  antigen theme robbyrussell
fi
@vikas027
Copy link
Author

vikas027 commented Apr 8, 2020

Anyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant