I’m trying to write a short function to hide all docks (i.e. Diagnostics, Tree View, Git). This is my first coffeescript function, and I’d benefit from some guidance of where to start.
So far, I’ve put this in my
atom.commands.add 'atom-workspace', 'custom:hide-panels': -> workspaceView = atom.views.getView(atom.workspace) atom.commands.dispatch(workspaceView, 'tree-view:hide')
and this in my
A couple of issues:
- Tree-view doesn’t seem to have a
hidemethod (nor do the other docks). Is there a way of hiding it without calling a method it?
- Are all the targets I’m trying to hide Docks? Or are some Panels? Can I get an array of all Docks / Panels without naming each in the function?