From 56f78ddcb320996d0fa9e0fd3b2899bee96a3887 Mon Sep 17 00:00:00 2001 From: Danny Rehelis Date: Mon, 25 Nov 2024 11:45:23 +0200 Subject: [PATCH] Control status bar button visibility (#158) * Control status bar button visibility * cr: remove explicit statusBar.hide --- changelog.d/157.added.md | 1 + package.json | 5 +++++ src/status.ts | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 changelog.d/157.added.md 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,