Last Updated: September 07, 2016
·
3.136K
· gnclmorais

Hide iTerm2 from OS X’s dock

If you’re like me, you spend a lot of your time on a console, so a fast and easy way to to switch in & out of it is a life saver. One of the first things I did when moving from (Arch) Linux from OS X was finding a good console with some sort of drop-down feature. Thus, I found iTerm2 and I’m quite happy about it, since it allowed me to map the §± top left corner key to show/hide the iTerm console.

However, iTerm continued on the dock and on the ⌘ + ⇥ [+ ⇧] programs list, which 1) became redundant since I had a faster way to go to the terminal and 2) it really annoyed me. So I did a web search for this and found a quick & simple solution from @lhunath:

#To remove iTerm from the dock:
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm\ 2.app/Contents/Info.plist

#To restore iTerm to the dock:
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm\ 2.app/Contents/Info.plist

I don’t know the current status of this, but I’ve noticed that this setting is reset every time iTerm updates. So if you find you iTerm again on the dock without you doing a thing, don’t freak out, it’s normal. Just run the command above again and you’re good to go.