5
6

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 5 years have passed since last update.

PowerLineでShellの見た目を変更しよう!(MacOS X, CentOS対応版)

Posted at

PowerLineでShellの見た目を変更しよう!

  • MacOS Xのターミナル大好きな人で、ただ、ただ、格好良さを追求したい人向け。

  • 完成予想図

soushi%20%E2%80%94%20-bash%20%E2%80%94%20ttys000%20%E2%80%94%20120%C3%9724%202016-01-20%2023-26-42.png

Mac OS Xの場合

1 こちらからフォントをダウンロードし、ターミナルの設定で、フォントをSource Code Pro for Powerlineにします。

mkdir ~/powerline
cd ~/powerline
git clone https://github.com/powerline/fonts
cd fonts
bash install.sh

==Source Code Pro for Powerline以外を選択すると文字化けするので注意!==

2 powerline-shellをインストールします。

cd
git clone https://github.com/milkbikis/powerline-shell
cd ./powerline-shell
./install.py
ln -s ~/powerline-shell/powerline-shell.py ~/powerline-shell.py

3 .bash_profileに下記を追記します。

function _update_ps1() {
    export PS1="$(~/powerline-shell.py $? 2> /dev/null)"
}
export PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"

4 source .bash_profileを実行します。

source ~/.bash_profile

Cent OS 6.6の場合

cd
# pypyをインストールします。
sudo yum -y --enablerepo=epel,rpmforge,remi search pypy
sudo yum -y --enablerepo=epel,rpmforge,remi info pypy
sudo yum -y --enablerepo=epel install pypy
sudo yum -y --enablerepo=epel install pypy-devel
sudo easy_install-2.6 argparse
# pythonのパッケージ管理ソフトpipをインストールします。
sudo curl -kL https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python
# pipを用いて、powerline本体をインストールします。
pip install powerline-status
# フォントをインストールします。
wget "https://github.com/powerline/fonts/archive/master.zip"
unzip master.zip
fonts-master/install.sh
5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?