LoginSignup
3
3

More than 5 years have passed since last update.

git bashにsolarizedのカラースキームの適用とエイリアス

Last updated at Posted at 2017-10-24

git bashにsolarizedを適用させる

solarizedのしろが目に優しいの感じがしていつも使ってるので、git bashにも使ってみる。

solarizedのカラーコードをダウンロード

mavnn/mintty-colors-solarized ここから、sol.darkとsol.lightをダウロードまたはコピペして任意の場所に置く。

~/.bashrcに設定を書き込む

~/.bashrcの中にsource ファイルパスを書き込む

~/.bashrc
source d:/Desktop/color/sol.light

その後、source ~/.bashrcbashとコマンドを打つか再起動すれば設定が反映される。

色を変更するエイリアス

~/.bashrc
alias light='sed -i "s/^source\sd:\/Desktop\/color\/.\+$/source d:\/Desktop\/color\/sol.light/" ~/.bashrc && source ~/.bashrc'
alias dark='sed -i "s/^source\sd:\/Desktop\/color\/.\+$/source d:\/Desktop\/color\/sol.dark/" ~/.bashrc && source ~/.bashrc'

これらのエイリアスでファイルパスを自分のものにすれば、lightまたはdarkと打てばsolarizedの色を変えることができる

気分や複数git bashを開いたときに気軽に色を変更できるので便利 :octocat:

3
3
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
3
3