Mac zsh+oh-my-zsh配置

zsh+oh-my-zsh配置

  1. 下载安装zsh解释器
$ brew install zsh zsh-completions
  1. 设置zsh为默认shell
$ echo $(which zsh) >> /etc/shells
$ chsh -s $(which zsh)
  1. 查看当前shell
$ echo $SHELL
  1. 安装oh-my-zsh
$ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
$ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
  1. 使配置生效
$ source ~/.zshrc
  1. 查看所有可用主题
$ ls ~/.oh-my-zsh/themes
  1. 修改zsh主题

编辑~/.zshrc文件,将ZSH_THEME=“candy”,即将主题修改为candy


spotlight

禁用和恢复

  1. 禁用方法:打开终端输入以下内容
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
  1. 恢复方法,打开终端,在终端中输入:
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

然后重启就可以了

删除和恢复图标

  1. 删除 spotlight 图标,在终端输入:cd /System/Library/CoreServices/
    sudo mv Search.bundle/ Search2.bundle/
    然后在活动监视器退出 SystemUIServer 进程.
  2. 恢复 spotlight 图标到菜单栏的方法,在终端输入:
    cd /System/Library/CoreServices/
    sudo mv Search2.bundle/ Search.bundle/
    然后在活动监视器退出 SystemUIServer 进程.

你可能感兴趣的:(Mac zsh+oh-my-zsh配置)