Skip to content

Instantly share code, notes, and snippets.

@bennyfactor
Last active March 9, 2023 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennyfactor/c2c652bfafcd574acac05eb6db7d06d8 to your computer and use it in GitHub Desktop.
Save bennyfactor/c2c652bfafcd574acac05eb6db7d06d8 to your computer and use it in GitHub Desktop.
Get an xterm in xquartz that actually supports unicode encodings, thank you homebrew
brew tap-new xquartz-unicode/libx11-unicode
# use a cdn to get a raw from github since occasionally downloading directly from raw.githubusercontent makes computers do a sad face
curl -L https://cdn.statically.io/gh/Homebrew/homebrew-core/HEAD/Formula/libx11.rb -o /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-libx11-unicode/Formula/libx11-unicode.rb
sed -i '' 's/class Libx11/class Libx11Unicode/g' /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-libx11-unicode/Formula/libx11-unicode.rb
sed -i '' 's/--enable-loadable-i18n//g' /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-libx11-unicode/Formula/libx11-unicode.rb
brew style --fix /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-libx11-unicode/Formula/libx11-unicode.rb
brew install --build-from-source libx11-unicode
brew tap-new xquartz-unicode/xterm-unicode
# use a cdn to get a raw from github since occasionally downloading directly from raw.githubusercontent makes computers do a sad face
curl -L https://cdn.statically.io/gh/Homebrew/homebrew-core/112f1aed2d485570bd3c9fd37cf8571cd39ceaf1/Formula/xterm.rb -o /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-xterm-unicode/Formula/xterm-unicode.rb
sed -i '' 's/class Xterm/class XtermUnicode/g' /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-xterm-unicode/Formula/xterm-unicode.rb
sed -i '' 's/depends_on "libx11"/depends_on "libx11-unicode"/g' /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-xterm-unicode/Formula/xterm-unicode.rb
sed -i '' 's/"--disable-debug",/"--disable-debug", "--enable-wide-chars",/g' /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-xterm-unicode/Formula/xterm-unicode.rb
brew style --fix /usr/local/Homebrew/Library/Taps/xquartz-unicode/homebrew-xterm-unicode/Formula/xterm-unicode.rb
brew install --build-from-source xterm-unicode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment