Skip to content

Commit

Permalink
group atom.commands.add
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 3, 2020
1 parent 786119b commit 96e5946
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions lib/tool-bar-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,12 @@ export class ToolBarView {
this.subscriptions = new CompositeDisposable();

this.subscriptions.add(
atom.commands.add('atom-workspace', 'tool-bar:toggle', () => {
this.toggle();
}),
atom.commands.add('atom-workspace', 'tool-bar:position-top', () => {
this.updatePosition('Top');
}),
atom.commands.add('atom-workspace', 'tool-bar:position-right', () => {
this.updatePosition('Right');
}),
atom.commands.add('atom-workspace', 'tool-bar:position-bottom', () => {
this.updatePosition('Bottom');
}),
atom.commands.add('atom-workspace', 'tool-bar:position-left', () => {
this.updatePosition('Left');
atom.commands.add("atom-workspace", {
'tool-bar:toggle': () => this.toggle(),
'tool-bar:position-top': () => this.updatePosition('Top'),
'tool-bar:position-right': () => this.updatePosition('Right'),
'tool-bar:position-bottom': () => this.updatePosition('Bottom'),
'tool-bar:position-left': () => this.updatePosition('Left'),
}),
atom.config.observe('tool-bar.iconSize', newValue => {
this.updateSize(newValue);
Expand Down

0 comments on commit 96e5946

Please sign in to comment.