Giter Site home page Giter Site logo

macos_settings's Introduction

macOS environment setup

some issues & solution

My dotfiles

Step 1: Install Homebrew

macOS 套件的管理工具

xcode-select --install

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2: Install cask

brew cask 來安裝應用程式要先執行: brew install cask or brew tap caskroom/cask

用 homebrew 安裝字型要先執行: brew tap caskroom/fonts

Step 3: Install git

brew install git

將預設 Git 改為 Homebrew 版本

Step 4: Install vim, tmux, zsh

brew install vim tmux zsh

My vim setup

My zsh setup

Install iTerm2, wget

brew cask install iterm2

brew install wget

iTerm2 setup color: iTerm2-Color-Schemes

eg. download Tomorrow-Night-Bright (save at projects/iTerm2-Color-Schemes/schemes/):

wget -O  "Tomorrow Night Bright.itermcolors" https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Tomorrow%20Night%20Bright.itermcolors

then import it.

Set zsh to be iTerm2 default shell:

a. Go to iTerm2 preferences.

b. Head to Profiles -> General.

c. Paste /bin/zsh in the Command textbox and restart iTerm2.

Step 5: Install powerline

powerline是一個python套件

5.1. Install powerline-status

pip install powerline-status

.bash_profile 設定加入(python路徑可能不一樣):

powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/local/lib/python3.6/site-packages/powerline/bindings/bash/powerline.sh

my settings:

powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /anaconda3/lib/python3.6/site-packages/powerline/bindings/bash/powerline.sh

5.2. font setup:

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

再去terminal設定那邊更改字型

5.3. To show gitstatus: ref

pip install powerline-gitstatus

my powerline-install-directory: /anaconda3/lib/python3.6/site-packages/

add some lines into: ${powerline-install-directory}/powerline/config_files/colorschemes/shell/default.json

add the following lines into ${powerline-install-directory}/powerline/config_files/themes/shell/default.json:

{
    "function": "powerline_gitstatus.gitstatus",
    "priority": 40
}

after edit above, save the file and run the following:

powerline-daemon —-replace in the Terminal.

5.4. vim setup:

add follow lines to .vimrc:

set rtp+={powerline-install-directory}/powerline/bindings/vim/
set laststatus=2
set t_Co=256

5.5. tmux setup:

add follow line to .tmux.conf:

source '{powerline-install-directory}/powerline/bindings/tmux/powerline.conf'

5.6. zsh setup:

add follow line to .zshrc:

{powerline-install-directory}/powerline/bindings/zsh/powerline.zsh

macos_settings's People

Contributors

tslsun avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.