OS

1. macOS

1.1. Hack

  • 自带中文输入法词组提示条消失

    pkill -f SCIM.app
    
  • 通过终端命令改变 Launchpad 中应用图标的大小

    1. 设置 Launchpad 的列数,对应于每一行 App 的个数

      defaults write com.apple.dock springboard-columns -int 列数
      
    2. 设置 Launchpad 的行数,对应于每一列 App 的个数

      defaults write com.apple.dock springboard-rows -int 行数
      
    3. 重置 Launchpad

      defaults write com.apple.dock ResetLaunchPad -bool TRUE
      
    4. 重置 Dock

      killall Dock
      

    也可以将所有指令放到一行中,每一个分句用「;」分隔,我们来看看将 Launchpad 从 7 x 5 布局调整为 9 x 7 布局的效果,在 terminal 中输入指令并按下回车:

    defaults write com.apple.dock springboard-columns -int 9;defaults write com.apple.dock springboard-rows -int 7;defaults write com.apple.dock ResetLaunchPad -bool TRUE;killall Dock
    

1.2. Software

1.2.1 Homebrew

https://docs.brew.sh/

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

Packages are installed in /usr/local/Cellar/ and linked to /usr/local/bin/

Other:

  1. leaves

    brew leaves # Show installed formulae that are not dependencies of another installed formula
    
  2. homebrew-rmtree

    https://github.com/beeftornado/homebrew-rmtree

    Remove a formula and its unused dependencies

    • Install

      brew tap beeftornado/rmtree
      
    • Use

      $ brew rmtree mpv
      ==> Examining installed formulae required by mpv...
      -  43 / 43
      
      Can safely be removed
      ----------------------
      automake
      lua
      mpg123
      mpv-player/mpv/libass-ct
      
      Proceed?[y/N]: y
      ==> Cleaning up packages safe to remove
      
      Uninstalling /usr/local/Cellar/mpv/0.9.2... (342 files, 35M)
      
      Uninstalling /usr/local/Cellar/automake/1.15... (130 files, 3.2M)
      
      Uninstalling /usr/local/Cellar/libass-ct/HEAD... (9 files, 440K)
      
      Uninstalling /usr/local/Cellar/lua/5.2.4... (81 files, 1.1M)
      
      Uninstalling /usr/local/Cellar/mpg123/1.22.2... (16 files, 656K)
      
    • Example

      $ brew rmtree python
      python can't be removed because other formula depend on it:
      mpv-player/mpv/mpv, newt, node, postgresql, sip, yasm
      $ brew rmtree --force python
      ... (I'm not going to run this but it would remove python)