Skip to content

Commit

Permalink
Control status bar button visibility (metalbear-co#158)
Browse files Browse the repository at this point in the history
* Control status bar button visibility

* cr: remove explicit statusBar.hide
  • Loading branch information
drehelis authored Nov 25, 2024
1 parent cb34aa7 commit 56f78dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/157.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an option to control mirrord status bar button visibility.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@
],
"default": false,
"description": "Enable mirrord by default on startup."
},
"mirrord.showStatusBarButton": {
"type": "boolean",
"default": true,
"description": "Controls whether the mirrord status bar button is visible"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions src/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export class MirrordStatus {
}

draw() {
const showStatusBar = vscode.workspace.getConfiguration('mirrord').get('showStatusBarButton', true);

if (!showStatusBar) {
return;
}

const {
enabled,
statusBar,
Expand Down

0 comments on commit 56f78dd

Please sign in to comment.