Skip to content

Instantly share code, notes, and snippets.

@stvhwrd
Last active August 15, 2024 23:48
Show Gist options
  • Save stvhwrd/ef4e177ab2c688b3b2c3 to your computer and use it in GitHub Desktop.
Save stvhwrd/ef4e177ab2c688b3b2c3 to your computer and use it in GitHub Desktop.
Hide the iTerm dock icon on Mac OS X

Note: you can now configure this simply in iTerm2's application settings. Go to Preferences > Appearance > System and select "Exclude from Dock and ⌘-Tab Application Switcher".


On my dual-drive MacBook Pro I have remapped the eject key to F13 using Karabiner and NoEjectDelay. The eject key has been assigned as the hotkey for a guake-style visor terminal using iTerm2. Having its own hotkey precludes the need for an icon, so I prefer to hide the iTerm dock icon.

To hide the dock icon of iTerm2 on Mac OS X:

/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist

To undo the above:

/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist

Disable animation of hotkey window on iTerm2:

defaults write com.googlecode.iterm2 HotkeyTermAnimationDuration -float 0.00001


tested with iTerm 2.0.0.20150412 on Apple MacBook Pro (Late 2011) running OS X 10.10.3

credit

@treefitty
Copy link

A note for future readers, this is actually supported natively in the app now: https://apple.stackexchange.com/questions/415556/how-to-hide-the-iterm-icon-from-status-menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment