0%

mac装机操作配置

记录一下常用的mac操作配置。

1. 操作

1.1 触发角

1

1.2 密码修改为1位数

1
pwpolicy -clearaccountpolicies

然后去系统偏好设置->用户与群组->修改密码

1.3 显示隐藏文件

1
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

1.4 固定F1-F12

系统偏好设置->键盘->触控栏显示

1.5 最小化程序到应用图标

系统偏好设置->Dock->Mini windows into application icon

1.6 访达配置

iShot_2022-06-25_15.16.46

2. 配置

2.1 前置软件

  • 下载dropbox和typora
  • 设置git
1
2
3
4
5
6
7
8
9
10
git config --global core.quotepath false
git config --global pull.rebase false

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

git config --global user.name "unix2dos"
git config --global user.email levonfly@gmail.com

git config --global user.name "liuwei"
git config --global user.email liuwei@funlink-tech.com

2.2 ssh配置

1
2
3
4
5
ln -s ~/Dropbox/_多重备份_/5\ LevonConfig/Config/ssh  ~/.ssh

sudo chmod 755 ~/.ssh
sudo chmod 600 ~/.ssh/*
sudo chown $USER ~/.ssh/*

2.3 下载仓库

1
2
3
4
5
cd && mkdir workspace && cd workspace

git clone git@github.com:unix2dos/LevonConfig.git
git clone git@github.com:unix2dos/unix2dos.github.io.git
git clone git@github.com:unix2dos/dohttp.git

2.4 vim插件

1
2
3
4
5
6
7
ln -s ~/Dropbox/_多重备份_/5\ LevonConfig/Config/vim/.vimrc ~/.vimrc

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

# 进入vim
:PlugInstall

2.5 zsh+tmux

  • 下载Alacritty

  • 安装brew

    1
    /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
  • 安装zsh + tmux

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 安装ohzsh
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

    # 下载安装特殊字体
    https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k

    # 安装tmux
    brew install tmux
    cd ~ && git clone https://github.com/gpakosz/.tmux.git
    ln -s -f .tmux/.tmux.conf
  • 配置

    1
    2
    3
    4
    5
    ln -s ~/Dropbox/_多重备份_/5\ LevonConfig/Config/zsh/.zshrc ~/.zshrc
    ln -s ~/Dropbox/_多重备份_/5\ LevonConfig/Config/tmux/.tmux.conf.local ~/.tmux.conf.local
    ln -s ~/Dropbox/_多重备份_/5\ LevonConfig/Config/alacritty/.alacritty.yml ~/.alacritty.yml

    tmux source-file ~/.tmux.conf

3. 软件

3.1 rm 删除到垃圾桶

1
2
brew install trash
alias rm=trash # 建议放到.zshrc里
给作者打赏,可以加首页微信,咨询作者相关问题!