Last active
July 18, 2017 08:40
-
-
Save chadbailey59/9271085 to your computer and use it in GitHub Desktop.
Auto hide your Atom tab bar if only one tab is open.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
F#$k both methods, first one does not work, second one only hides the tabs, not the tab bar, which I find insanely stupid. Shame on you @andymcintosh for such a retarded solution
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
The script approach seems to have bit-rotted and the CSS approach doesn't actually collapse the tab bar area -- it simply hides the tab UI element. Any updated versions of this?