0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ローカルか SSH 接続先かで色を分ける Zsh テーマ

0
Last updated at Posted at 2026-04-11

Oh My Zsh で気に入るテーマがなかったので作った。

screenshot.svg.png

特徴

  • ローカルは cyan、SSH は magenta
    • 複数端末で同じテーマを利用しているときに接続元か接続先かを区別しやすくする
    • テーマ名 litmus はこの色分けに由来
  • プロンプト左側にタイムスタンプを表示
    • ディレクトリやブランチを変えたときに始点の位置が動かないよう固定長に
  • 右側に user@host、作業ディレクトリ、Git ブランチ、ワークツリー状態を表示
  • root ではプロンプト記号が # に変わる
  • 終了ステータスが非ゼロなら表示を強調

インストール

  1. Oh My Zsh をインストール

  2. テーマを配置

    git clone https://github.com/dceoy/litmus-zsh-theme.git \
      ~/.oh-my-zsh/custom/themes/litmus-zsh-theme
    ln -sf ~/.oh-my-zsh/custom/themes/litmus-zsh-theme/litmus.zsh-theme \
      ~/.oh-my-zsh/custom/themes/litmus.zsh-theme
    
  3. ~/.zshrc 内でテーマを設定

    ZSH_THEME="litmus"
    
  4. リロード

    source ~/.zshrc
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?