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?

More than 1 year has passed since last update.

power-line風にターミナルを見やすくする方法(Macバージョン)

Posted at

ゴールは下図のような感じの画面です

スクリーンショット 2023-08-04 11.36.35.png

cdコマンドgit pushgit checkoutなどのコマンドを入力し、スペースキーを入力した後、tabキーか矢印キーを押すと画像のように背景が白色になり選択することができます。

早速手順をご紹介いたします!

まず初めに私のマシンのスペック、環境は下記でございます

  • MacBookAir M2チップ
  • 8コアCPU
  • 8コアGPU
  • 8GBユニファイドメモリ
  • 256GB
  • 13.6インチ
  • MacOS Ventura 13.5

1.HyperというターミナルAppをインストール

homebrewからでも公式からでもどちらでもインストールできます!
コマンド:brew install --cask hyper
公式:https://hyper.is

※もしbrew not foundというようなエラーが出た際は下記コマンドでhomebrewをインストールしてあげてください!

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. oh my zshをインストール

下記コマンドでoh my zshをインストール

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

下記公式になります!

3.エディタで.zshrcファイルを下記のように記述します

.zshrc

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="robbyrussell" ←←←←←←コメントアウトしてください!!
ZSH_THEME="agnoster" ←←←←←←こちらを書き足してください!!


下記省略

4..hyper.jsで文字化け対策の設定

下図14行目の青枠部分(Monaco for Powerline)を追記してあげます!

スクリーンショット 2023-08-04 12.12.53.png

以上です!

最後に...

既存のターミナルとiTermは使用しておりません。
理由としてはHyperの方がカスタマイズ性が高く設定が簡単であると感じましたためでございます。

またzpreztoでpowerlineのように設定できる方法もありましたが少し手間が多くなりこちらの方法を記載致しました。
ターミナルが見やすくなると作業の効率も上がってきますのでぜひお試しください!

毎度のことですが何か記事の内容等でご指摘部分ございましたらコメントでご教授いただければと思います。m(_ _)m

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?