作为一个 Linux 的老用户,我再一次验证了那句老话「Linux 用户有钱就换 Mac」。 前段时间,托朋友从香港购入一台 rMBP,下面就是我的 Mac 使用安装记录。

Brew

Brew 是 Mac 下面的包管理工具,通过 Github 托管适合 Mac 的编译配置以及 Patch,可以方便的安装开发工具。

安装 Brew:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

我安装的 Brew 包:

brew install ack
brew install adns
brew install android-sdk
brew install ansible
brew install ansible20
brew install apple-gcc42
brew install apr
brew install apr-util
brew install archey
brew install aria2
brew install asciidoc
brew install asio
brew install atk
brew install augeas
brew install autoconf
brew install autojump
brew install automake
brew install avr-binutils
brew install avr-gcc
brew install avr-libc
brew install awscli
brew install axel
brew install bdw-gc
brew install bfg
brew install boost
brew install burp
brew install c-ares
brew install cabal-install
brew install cairo
brew install certbot
brew install cliclick
brew install cloog
brew install cmake
brew install cmatrix
brew install colordiff
brew install connect
brew install coreutils
brew install cowsay
brew install cpp-netlib
brew install cscope
brew install ctags
brew install curl
brew install curl-ca-bundle
brew install dcfldd
brew install ddrescue
brew install dialog
brew install dirmngr
brew install dnstop
brew install docbook
brew install docker
brew install docker-compose
brew install docker-machine
brew install dos2unix
brew install erlang
brew install ettercap
brew install ext4fuse
brew install faac
brew install fcitx-remote-for-osx
brew install fd
brew install fetchmail
brew install ffind
brew install ffmpeg
brew install figlet
brew install findutils
brew install fontconfig
brew install fortune
brew install fping
brew install freetype
brew install fzf
brew install gcc
brew install gd
brew install gdbm
brew install gdk-pixbuf
brew install gettext
brew install gflags
brew install gfortran
brew install ghc
brew install ghc@8.0
brew install gifsicle
brew install git
brew install git-extras
brew install git-flow
brew install git-lfs
brew install git-number
brew install giter8
brew install glew
brew install glib
brew install glog
brew install gmp
brew install gmp@4
brew install gnu-getopt
brew install gnu-sed
brew install gnu-tar
brew install gnu-time
brew install gnupg
brew install gnupg2
brew install gnutls
brew install go
brew install goaccess
brew install gobject-introspection
brew install godep
brew install gource
brew install gpg-agent
brew install gradle
brew install grafana
brew install graphite2
brew install graphviz
brew install grep
brew install grok
brew install groovy
brew install gtk+
brew install haproxy
brew install harfbuzz
brew install hicolor-icon-theme
brew install html2text
brew install htop-osx
brew install httpie
brew install hydra
brew install icu4c
brew install ifstat
brew install iftop
brew install imagemagick
brew install influxdb
brew install ipcalc
brew install iperf
brew install isl
brew install isl@0.12
brew install jansson
brew install jemalloc
brew install jenv
brew install jetty
brew install jnettop
brew install jpeg
brew install jq
brew install jshon
brew install kafka
brew install lame
brew install languagetool
brew install libao
brew install libarchive
brew install libassuan
brew install libconfig
brew install libdaemon
brew install libev
brew install libevent
brew install libexif
brew install libffi
brew install libgcrypt
brew install libgpg-error
brew install libiodbc
brew install libksba
brew install libmagic
brew install libmpc
brew install libnet
brew install libpng
brew install librdkafka
brew install libressl
brew install librsync
brew install libsodium
brew install libsoxr
brew install libssh
brew install libtasn1
brew install libtermkey
brew install libtiff
brew install libtool
brew install libunistring
brew install libusb
brew install libusb-compat
brew install libuv
brew install libvo-aacenc
brew install libvterm
brew install libxml2
brew install libyaml
brew install libzip
brew install little-cms
brew install lldpd
brew install lrzsz
brew install lsyncd
brew install lua
brew install lua52
brew install luajit
brew install luarocks
brew install lynx
brew install lz4
brew install lzlib
brew install lzo
brew install makedepend
brew install maven
brew install mbedtls
brew install memcache-top
brew install memcached
brew install mercurial
brew install mit-scheme
brew install mitmproxy
brew install mongodb
brew install mono
brew install mp4v2
brew install mpfr
brew install mpg123
brew install msgpack
brew install msodbcsql
brew install mssql-tools
brew install mtr
brew install multitail
brew install mycli
brew install mysql
brew install neovim
brew install nettle
brew install nghttp2
brew install nginx
brew install nload
brew install nmap
brew install node
brew install nodeenv
brew install npth
brew install nspr
brew install nsq
brew install nuget
brew install objective-caml
brew install ocaml
brew install oniguruma
brew install opencc
brew install openssl
brew install openssl101
brew install openssl@1.1
brew install openvpn
brew install osquery
brew install ossp-uuid
brew install p11-kit
brew install p7zip
brew install pandoc
brew install pango
brew install pcre
brew install perl
brew install phantomjs
brew install pinentry
brew install pixman
brew install pkg-config
brew install plantuml
brew install pngpaste
brew install popt
brew install privoxy
brew install protobuf
brew install proxychains-ng
brew install pth
brew install pwgen
brew install python
brew install python3
brew install qt
brew install qt5
brew install r
brew install rapidjson
brew install rclone
brew install readline
brew install reattach-to-user-namespace
brew install redis
brew install rename
brew install rlwrap
brew install rmtrash
brew install rocksdb
brew install rsync
brew install ruby
brew install ruby-build
brew install s-lang
brew install s3cmd
brew install sbt
brew install scala
brew install scons
brew install sdl2
brew install sdl2_image
brew install shadowsocks-libev
brew install shairport
brew install shairport-sync
brew install shared-mime-info
brew install shyaml
brew install siege
brew install sleuthkit
brew install snappy
brew install sntop
brew install socat
brew install source-highlight
brew install spark
brew install spdylay
brew install sphinx-doc
brew install springboot
brew install sqlite
brew install sqlmap
brew install ssh-copy-id
brew install sshfs
brew install sshpass
brew install stunnel
brew install subversion
brew install swig
brew install sysbench
brew install taglib
brew install texi2html
brew install the_silver_searcher
brew install thefuck
brew install thrift
brew install tidy-html5
brew install tig
brew install tinyproxy
brew install tldr
brew install tmate
brew install tmux
brew install tokyo-cabinet
brew install tree
brew install typescript
brew install udns
brew install udptunnel
brew install unibilium
brew install unison
brew install unixodbc
brew install utf8proc
brew install vim
brew install w3m
brew install watch
brew install watchman
brew install webkit2png
brew install webp
brew install wget
brew install wxmac
brew install x264
brew install xclip
brew install xvid
brew install xz
brew install yara
brew install yasm
brew install yuicompressor
brew install zookeeper
brew install zsh
brew install zstd

Brew cask

Brew cask 是类似 Brew 的管理工具, 直接提供 dmg 级别的二进制包,(Brew 是不带源码,只有对应项目所在的 URL)。

Brew cask 安装:

brew tap phinze/homebrew-cask
brew install brew-cask

我通过 Brew cask 安装的软件:

brew cask install airdisplay
brew cask install alfred
brew cask install aliwangwang
brew cask install android-studio
brew cask install apache-directory-studio
brew cask install appcleaner
brew cask install appium
brew cask install atom
brew cask install balsamiq-mockups
brew cask install battle-net
brew cask install bearychat
brew cask install bee
brew cask install bonjour-browser
brew cask install caffeine
brew cask install cctalk
brew cask install dash
brew cask install dbeaver-community
brew cask install dingtalk
brew cask install dotnet-sdk
brew cask install dropbox
brew cask install eclipse-java
brew cask install evernote
brew cask install filezilla
brew cask install firefox
brew cask install folx
brew cask install ganttproject
brew cask install gimp
brew cask install github-desktop
brew cask install gitup
brew cask install gnucash
brew cask install google-chrome
brew cask install google-cloud-sdk
brew cask install google-drive
brew cask install google-earth
brew cask install haroopad
brew cask install ichm
brew cask install icq
brew cask install iina
brew cask install inkscape
brew cask install intellij-idea
brew cask install istat-menus
brew cask install iterm2
brew cask install itools
brew cask install java
brew cask install jumpcut
brew cask install jxplorer
brew cask install karabiner
brew cask install keepassx
brew cask install kid3
brew cask install kindle
brew cask install kindlegen
brew cask install krita
brew cask install licecap
brew cask install limechat
brew cask install macdown
brew cask install mactex
brew cask install macvim
brew cask install mat
brew cask install mongohub
brew cask install mono-mdk
brew cask install musicbrainz-picard
brew cask install mysql-utilities
brew cask install mysqlworkbench
brew cask install netbeans
brew cask install neteasemusic
brew cask install omnidisksweeper
brew cask install osxfuse
brew cask install phoenix
brew cask install postman
brew cask install proxifier
brew cask install psequel
brew cask install qlmarkdown
brew cask install qq
brew cask install qqmusic
brew cask install qutebrowser
brew cask install rescuetime
brew cask install robo-3t
brew cask install robomongo
brew cask install screenhero
brew cask install sequel-pro
brew cask install shadowsocksx
brew cask install skitch
brew cask install slack
brew cask install smartsynchronize
brew cask install sourcetree
brew cask install splayerx
brew cask install sqlitebrowser
brew cask install sqlpro-for-mssql
brew cask install squirrelsql
brew cask install steam
brew cask install sublime-text
brew cask install surge
brew cask install taskwarrior-pomodoro
brew cask install teamviewer
brew cask install teensy
brew cask install telegram
brew cask install the-unarchiver
brew cask install thunder
brew cask install toodledo
brew cask install tripmode
brew cask install typora
brew cask install universal-media-server
brew cask install vanilla
brew cask install vimr
brew cask install virtualbox
brew cask install virtualbox-extension-pack
brew cask install viscosity
brew cask install visual-studio-code
brew cask install visualvm
brew cask install vlc
brew cask install vnc-viewer
brew cask install wechatwebdevtools
brew cask install wewechat
brew cask install wifimasterkey
brew cask install wireshark
brew cask install wxwork
brew cask install xamarin-studio
brew cask install xiami
brew cask install xmind
brew cask install xquartz
brew cask install yed
brew cask install zeronet

按键配置

(2016-02-23 update: Slate 之后,我尝试了其他的伪平铺式管理系统,最后使用了 Phoenix,我的配置文件在 .oOo./.phoenix.js at master · alswl/.oOo.

作为 Awesome 的用户,我实在是受不了 Mac 默认的按键控制,太渣。在两天狂搜之后,尝试了 Divvy / BetterTouchToll 这些按键控制软件之后,还是觉得按键不够自由,直到我发现了 Slate

Slate 可以管理几乎所有按键,并进行 窗口/Workspace/Shell 控制,配合 Cliclick 可以完全完成桌面控制。

下面是我配置的 .slate 文件:

详细代码可以参见 alswl/.oOo.

# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.

config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize

# Alias
alias mouse_left shell path:~/ '/usr/local/bin/cliclick m:640,400 && /Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh'
alias mouse_right shell path:~/ '/usr/local/bin/cliclick m:1920,400 && /Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh'

alias mouse_iTerm shell path:~/ '/Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh iTerm'
alias mouse_Firefox shell path:~/ '/Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh Firefox'
alias mouse_Google_Chrome shell path:~/ '/Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh Google_Chrome'
alias mouse_QQ shell path:~/ '/Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh QQ'
alias mouse_MacVim shell path:~/ '/Users/alswl/dev/myproject/.oOo./local/bin/mouse_restore.sh MacVim'

# Resize Bindings
#bind right:alt       resize +10% +0
#bind left:alt        resize -10% +0
#bind up:alt          resize +0   -10%
#bind down:alt        resize +0   +10%
#bind right:ctrl;alt  resize -10% +0 bottom-right
#bind left:ctrl;alt   resize +10% +0 bottom-right
#bind up:ctrl;alt     resize +0   +10% bottom-right
#bind down:ctrl;alt   resize +0   -10% bottom-right

# Push Bindings
#bind right:ctrl;cmd  push right bar-resize:screenSizeX/3
#bind left:ctrl;cmd   push left  bar-resize:screenSizeX/3
#bind up:ctrl;cmd     push up    bar-resize:screenSizeY/2
#bind down:ctrl;cmd   push down  bar-resize:screenSizeY/2

# Nudge Bindings
#bind right:shift;alt nudge +10% +0
#bind left:shift;alt  nudge -10% +0
#bind up:shift;alt    nudge +0   -10%
#bind down:shift;alt  nudge +0   +10%

# Throw Bindings
bind 1:ctrl;alt         throw 0 resize
bind 2:ctrl;alt         throw 1 resize
#bind 3:ctrl;alt         throw 2 resize
#bind right:ctrl;alt;cmd throw right resize
#bind left:ctrl;alt;cmd  throw left  resize
#bind up:ctrl;alt;cmd    throw up    resize
#bind down:ctrl;alt;cmd  throw down  resize

# Focus Bindings
bind `:alt     sequence ${mouse_iTerm} > focus 'iTerm'
bind 1:alt     sequence ${mouse_Firefox} > focus 'Firefox'
bind 2:alt     sequence ${mouse_Google_Chrome} > focus 'Google Chrome'
bind 3:alt     sequence ${mouse_QQ} > focus 'QQ'
bind q:alt     sequence ${mouse_MacVim} > focus 'MacVim'
bind h:alt     sequence ${mouse_left} > focus left
bind l:alt     sequence ${mouse_right} > focus right
#bind up:cmd       focus up
#bind down:cmd     focus down
bind k:alt   focus behind
bind j:alt focus behind

# Window Hints
#bind esc:cmd hint

# Toogle Application
#bind `:alt toggle 'iTerm'

其中用到的鼠标位置记忆脚本是这样的:

#!/bin/sh

## Save
# get current postion, save to last
CURRENT_WINDOW=iTerm
[ -f /tmp/SLATE_M_CURR ] && CURRENT_WINDOW=`cat /tmp/SLATE_M_CURR`

# save now pos

NOW_POS=`/usr/local/bin/cliclick p | /usr/bin/awk '{print $4}'`
echo $NOW_POS > /tmp/SLATE_M_$CURRENT_WINDOW

## Restore
if [ $1 != '' ]; then
        # get wanted position
        POS=500,400
        [ -f /tmp/SLATE_M_$1 ] && POS=`cat /tmp/SLATE_M_$1`

        # restore postion
        /usr/local/bin/cliclick m:$POS

        #LAST_WINDOW=iTerm
        #[ -f /tmp/SLATE_M_LAST_WINDOW ] && LAST_WINDOW=`cat /tmp/SLATE_M_LAST_WINDOW`
        echo $1 > /tmp/SLATE_M_CURR
fi
  • 2016-02-23 updated: brew / brew cask list.
  • 2017-10-09 updated: brew / brew cask list.

原文链接: https://blog.alswl.com/2013/12/mac/
3a1ff193cee606bd1e2ea554a16353ee
欢迎关注我的微信公众号:窥豹

Comments

comments powered by Disqus