Skip to content

Instantly share code, notes, and snippets.

@chadbailey59
Last active July 18, 2017 08:40
Show Gist options
  • Save chadbailey59/9271085 to your computer and use it in GitHub Desktop.
Save chadbailey59/9271085 to your computer and use it in GitHub Desktop.
Auto hide your Atom tab bar if only one tab is open.
# Put this in your init script (Atom ➞ Open Init Script)
tabs = atom.workspaceView.find('.tab-bar')
tabs.on "DOMNodeInserted", ->
# find each tab bar
if (tabs.find('li').length) > 1
tabs.slideDown(300)
else
tabs.slideUp(300)
@mekkanizer
Copy link

Found it.
1. Atom > Preferences
2. Click on "Packages"
3. Search for "tabs" package
4. Click the "Settings" button for the "tabs" package.
5. Untick "Always Show Tab Bar"
And the styling solution to really hide tab bar:
.tab-bar { height: 0px; visibility: hidden; }

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