Try   HackMD

My first take on Macbook Air M1

Started on 2022/6/24.
Disclaimer: I don't use an iPhone.

Notable zsh config

Why there's no default .zshrc provided??? My suggestion would be copying from Debian's default one at /etc/skel. Note that I mainly use bash (dash) on Linux.

  • Homebrew
  • dircolors
    • You need to install coreutils for the dircolors utility (beware that is gdircolors on brew). See this comment.
  • Remove / from WORDCHARS: export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
    • Make Alt+d more useful

BSD commands are less forgiving than those in GNU coreutils (I mean rm ... -rf, or ls ... -al).

Bash globstar

https://apple.stackexchange.com/a/291290/464631

Python!

sudo mkdir -p /usr/local/bin
sudo ln -s /usr/bin/python3 /usr/local/bin/python
sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python ./python3

If you don't link the one in Xcode SDK, it will fail with the following error when /usr/local/bin/python is invoked, "xcode-select: Failed to locate 'python', requesting installation of command line developer tools."

However, pip will stuck indefinitely if you do the same thing to it. I wonder why. Do the following instead.

sudo ln -s /Library/Developer/CommandLineTools/usr/bin/pip3 /usr/local/bin/pip

IME

I mainly use RIME on Mac (鼠鬚管,squirrel).

My own bopomofo input solution iridium-bpmf works on 鼠鬚管. Some tweaks are required, as I was developing for ibus-rime mainly.

  • Mac cannot distinguish between Shift_L and Shift_R (the (non-)issue).
  • Iridium's key-bindings when the candidate list arrangement is horizontal (which is preferred) cannot work properly due to hardcoded selector keys. (Infeasible without patching the source.)

Terminal emulator

iTerm2, an extremely versatile terminal emulator.

My curated list of open source projects

  • Alt-tab, GPL v3.
    Make the behavior of option+tab similar to alt+tab on Windows.
  • Stats, MIT.
    A system monitor on menu bar. Not very ideal, some widget design seems peculiar. But (claimed to be) efficient. I also prefer its battery indicator over the built-in one.
  • iGlance, GPL v3. Also a system monitor on menu bar. I forgot why this is on my list.
  • Rectangle, MIT.
    Window snapping with ease. I don't use the hot keys for now, only appreciating the drag-and-drop behavior.
  • CotEditor, Apache v2.
    A lightweight text/code editor. Fast startups yet feature-rich. Thanks Yu-Ren for recommending this.

A rather small list :)