diff --git a/changelog.d/157.added.md b/changelog.d/157.added.md new file mode 100644 index 00000000..8598b574 --- /dev/null +++ b/changelog.d/157.added.md @@ -0,0 +1 @@ +Add an option to control mirrord status bar button visibility. \ No newline at end of file diff --git a/package.json b/package.json index 67d38b04..f90171ef 100644 --- a/package.json +++ b/package.json @@ -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" } } }, diff --git a/src/status.ts b/src/status.ts index eef360b0..15bcc3bc 100644 --- a/src/status.ts +++ b/src/status.ts @@ -18,6 +18,12 @@ export class MirrordStatus { } draw() { + const showStatusBar = vscode.workspace.getConfiguration('mirrord').get('showStatusBarButton', true); + + if (!showStatusBar) { + return; + } + const { enabled, statusBar,