====== iTerm ======
* 可以設為「Quake-like」(詳下)
===== Tip =====
Quake-like
{{url>https://marcjenkins.co.uk/drop-down-terminal-with-iterm2/ ,700px}}--- [[https://marcjenkins.co.uk/drop-down-terminal-with-iterm2/|Drop down terminal with iTerm2 — Marc Jenkins]]
* zsh
* oh-my-zsh
* Powerline9k
* 安裝 nerd fontbrew tap homebrew/cask-fonts
* 裝了以後,還是有亂碼啊,奈何?\\ ↑哦,non-ASCII 字型也要設為 powerline 或 nerd,而且好像主要是設在 non-ASCII 就好,反而 ASCII 字元可以隨便用
* icon 沒出現?✅ ← 把 ''%%POWERLEVEL9K_MODE='nerdfont-complete'%%'' 這行放到 ''ZSH_THEME'' 宣告行之前就行了!(([[https://blog.goodjack.tw/2018/09/powerlevel9kmode.html|[筆記] 設定了 POWERLEVEL9K_MODE 卻沒顯示圖示? | 小克's 部落格]]))
* 自己 patch 其他字型加上 nerd/powerline 圖示
* [[https://github.com/ryanoasis/nerd-fonts#font-patcher|Option 8: Patch Your Own Font]]
nerd 的 font-patcher 有點費事,需要用 Homebrew 裝的 FontForge,而不能用 XQuartz 版的 FontForge。(([[https://github.com/ryanoasis/nerd-fonts/issues/225|"FontForge module is probably not installed" · Issue #225 · ryanoasis/nerd-fonts]]))有點太折騰人了,暫時擱著吧。
* powerline10k
* 需要 zsh 5.1.0,而我 macOS 內建只有 5.0.8
設為「預設」終端機程式?
❎ ∵macOS 本身沒有「預設」終端機程式的概念(([[https://superuser.com/questions/379342/setting-iterm2-as-the-default-terminal-osx-lion|terminal.app - Setting iTerm2 as the default terminal (OSX Lion) - Super User]]))
* 參考:[[g>macos+set+default+terminal]]
* Alfred
- 設定 ''custom'',/-啟動腳本用 ''iTerm''-/ → 未見效
- iTerm 官方有提供[[https://gist.githubusercontent.com/gnachman/4cbe6743baa7fe07536b/raw/61fceba4a0b2624850ac1b4a20ac8ca48e07f7d2/gistfile1.txt|支援腳本]],複雜多了,但有效 ✅((☞ [[https://iterm2.com/version3.html|Alfred Support]];\\ 另外也有非官方 [[https://github.com/vitorgalvao/custom-alfred-iterm-scripts|vitorgalvao/custom-alfred-iterm-scripts: AppleScript for iTerm2 Alfred integration.]] 蠻新的,先存參;\\ Alfred 4 有人用[[https://shuwn.dev/2019/06/02/讓-alfred-4-支援 iterm/|讓 Alfred 4 支援 iTerm | 一人の旅行記]]))\\ (我實際使用時,第一次腳本會問我「iTerm2」app 在哪?我必須選我的「/Applications/iTerm.app」,之後就可以用了,不知道是否因為我的 iTerm2 是 3.0.7 而已)
* 其他還有不少通訊協定及副檔名,都要一一設定啊……(([[https://superuser.com/questions/379342/setting-iterm2-as-the-default-terminal-osx-lion|terminal.app - Setting iTerm2 as the default terminal (OSX Lion) - Super User]]))
* 我把 ssh 從 Welly 設過來了
* Finder:右鍵選單的 service 應該是 iTerm 內建提供的,不需要做什麼就可以直接用
* [[https://show6114.com/2015/09/24/ptt-with-terminal/|用終端機上 PTT – 科科仔]]
* ↑我自己試過:
* 可以讓終端機變很寬,顯示更多字元(> 80×25),有趣,新體驗
* iTerm 的各式各樣 profile 設定都用得到,包括 color 等等,也是新風貌
* 不過 ASCII 美工圖就破破的,不如 Welly 之類的完整
* 【結論】我還是會用 Welly((FIXME 待連結 Welly 頁面)),因為專屬 BBS 的功能(自動登入、自動連結、開圖)等更多
===== 問題 =====
顯示非 ASCII 字元?
漢字原本都顯示為 ''????'',就算編碼已設為 Traditional Chinese Big5 也沒用
cf. 內建終端機不需要任何設定耶
> [[https://ephrain.net/mac-在-iterm-中打出來的中文字都變成-?/|[Mac] 在 iTerm 中打出來的中文字都變成 —- ? | EPH 的程式日記]]
看來應該是設為 UTF-8,然後可能要重開 iTerm
===== 參考 =====
* [[https://medium.com/statementdog-engineering/prettify-your-zsh-command-line-prompt-3ca2acc967f|超簡單!十分鐘打造漂亮又好用的 zsh command line 環境 | by Gary Chu | 財報狗技術部落格 | Medium]]
* [[https://medium.com/nitas-learning-journey/mac終端機-terminal-設定-iterm2-ba63efd0df6a|Mac終端機 (Terminal)設定: iTerm 2. MacOS+iTerm2+Oh My Zsh | by Nita Lin | Nita’s Learning Journey | Medium]]
* [[https://medium.com/@h86991868/看膩了一成不變的小黑窗-改用iterm2-oh-my-zsh吧-cc2b0683acb|看膩了一成不變的小黑窗?改用iterm2 + oh-my-zsh吧 | by Nathan Chou | Medium]]
* [[https://www.itread01.com/content/1550242447.html|iTerm2 + Oh my ZSH+ Powerline 打造個性終端最終版 - IT閱讀]]
* [[https://gist.github.com/kevin-smets/8568070|iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)]]
* 裡面有介紹 syntax highlighting、auto suggestion