Discover, install, and configure shell plugins with Fig Plugin Store →
🍏

Zsh iTerm Touchbar

Display feedback of terminal in the 🍏 Touchbar

iam4x
|
682 stars
75 forks

zsh iTerm Touchbar

Display feedback of terminal in the 🍏 Touchbar

preview1

preview2

Currently it shows:

  • F1 - Current directory 👉
  • F2 - Current git branch, press to display all branches and switch between them 🎋
  • F3 - Current git repo status 🔥 / 🙌
    • + — uncommitted changes in the index;
    • ! — unstaged changes;
    • ? — untracked changes;
    • $ — stashed changes;
    • — unpulled commits;
    • — unpushed commits.
  • F4 - Push to origin branch (git push origin [branch]) ✉️
  • F5 - Display npm-run or yarn-run scripts from package.json ⚡️ /🐱

Requirements

  • iTerm2 3.1.beta.3 (OS 10.10+) - Download
  • zsh shell
  • a zsh-framework like antigen or zgen
  • node (brew install node)

Into iterm2: Go into View -> Customize Tool Bar... and drag & drop the Fn module

Customize

ENV variables to enable or disable git:

TOUCHBAR_GIT_ENABLED=true

ENV variables for git icons:

GIT_UNCOMMITTED="+"
GIT_UNSTAGED="!"
GIT_UNTRACKED="?"
GIT_STASHED="$"
GIT_UNPULLED="⇣"
GIT_UNPUSHED="⇡"

ENV variables to enable or disable yarn:

YARN_ENABLED=true

Read more / Credits