From 9425920f94117f52a8cfe8253d7e7c4863ef4b94 Mon Sep 17 00:00:00 2001 From: Charles Buffington Date: Tue, 7 May 2024 12:13:19 -0400 Subject: [PATCH 1/3] add setting to hide tray (menubar for macos) --- app/lib/app.ts | 2 +- locale/en-GB.po | 8 ++++++++ tabby-core/src/configDefaults.yaml | 1 + tabby-settings/src/components/settingsTab.component.pug | 9 +++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/lib/app.ts b/app/lib/app.ts index a6c8f68213..75a288c845 100644 --- a/app/lib/app.ts +++ b/app/lib/app.ts @@ -183,7 +183,7 @@ export class Application { } enableTray (): void { - if (!!this.tray || process.platform === 'linux') { + if (!!this.tray || process.platform === 'linux' || this.configStore.showTray === false) { return } if (process.platform === 'darwin') { diff --git a/locale/en-GB.po b/locale/en-GB.po index 7bb588af25..752421d988 100644 --- a/locale/en-GB.po +++ b/locale/en-GB.po @@ -2036,6 +2036,10 @@ msgstr "" msgid "Show Serial connections" msgstr "" +#: locale/tmp-html/tabby-settings/src/components/settingsTab.component.html:73 +msgid "Show Tabby in tray or menu bar." +msgstr "" + #: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:152 msgid "Show tabs in fullscreen mode" msgstr "" @@ -2044,6 +2048,10 @@ msgstr "" msgid "Show toolbar" msgstr "" +#: locale/tmp-html/tabby-settings/src/components/settingsTab.component.html:73 +msgid "Show tray" +msgstr "" + #: locale/tmp-html/tabby-settings/src/components/vaultSettingsTab.component.html:45 msgid "Show vault contents" msgstr "" diff --git a/tabby-core/src/configDefaults.yaml b/tabby-core/src/configDefaults.yaml index 6c1fc36ad6..9b6244db81 100644 --- a/tabby-core/src/configDefaults.yaml +++ b/tabby-core/src/configDefaults.yaml @@ -43,6 +43,7 @@ enableWelcomeTab: true electronFlags: - ['force_discrete_gpu', '0'] enableAutomaticUpdates: true +showTray: true version: 1 vault: null encrypted: false diff --git a/tabby-settings/src/components/settingsTab.component.pug b/tabby-settings/src/components/settingsTab.component.pug index e923d29f53..19b1a5fbfd 100644 --- a/tabby-settings/src/components/settingsTab.component.pug +++ b/tabby-settings/src/components/settingsTab.component.pug @@ -100,6 +100,15 @@ .description(translate) Enable automatic installation of updates when they become available. toggle([(ngModel)]='config.store.enableAutomaticUpdates', (ngModelChange)='saveConfiguration()') + .form-line(*ngIf='hostApp.platform !== Platform.Web') + .header + .title(translate) Show tray + .description(translate) Show Tabby in tray or menu bar. + toggle( + [(ngModel)]='config.store.showTray', + (ngModelChange)='saveConfiguration(true)' + ) + .form-line(*ngIf='hostApp.platform !== Platform.Web') .header .title(translate) Debugging From 439a7a8d44b21b7420bf128ece8b04f292408eac Mon Sep 17 00:00:00 2001 From: Charles Buffington Date: Mon, 17 Jun 2024 19:26:39 -0400 Subject: [PATCH 2/3] move 'show tray' setting to window settings --- locale/en-GB.po | 4 ++-- tabby-settings/src/components/settingsTab.component.pug | 9 --------- .../src/components/windowSettingsTab.component.pug | 9 +++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/locale/en-GB.po b/locale/en-GB.po index 752421d988..1afee621fe 100644 --- a/locale/en-GB.po +++ b/locale/en-GB.po @@ -2036,7 +2036,7 @@ msgstr "" msgid "Show Serial connections" msgstr "" -#: locale/tmp-html/tabby-settings/src/components/settingsTab.component.html:73 +#: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73 msgid "Show Tabby in tray or menu bar." msgstr "" @@ -2048,7 +2048,7 @@ msgstr "" msgid "Show toolbar" msgstr "" -#: locale/tmp-html/tabby-settings/src/components/settingsTab.component.html:73 +#: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73 msgid "Show tray" msgstr "" diff --git a/tabby-settings/src/components/settingsTab.component.pug b/tabby-settings/src/components/settingsTab.component.pug index 19b1a5fbfd..e923d29f53 100644 --- a/tabby-settings/src/components/settingsTab.component.pug +++ b/tabby-settings/src/components/settingsTab.component.pug @@ -100,15 +100,6 @@ .description(translate) Enable automatic installation of updates when they become available. toggle([(ngModel)]='config.store.enableAutomaticUpdates', (ngModelChange)='saveConfiguration()') - .form-line(*ngIf='hostApp.platform !== Platform.Web') - .header - .title(translate) Show tray - .description(translate) Show Tabby in tray or menu bar. - toggle( - [(ngModel)]='config.store.showTray', - (ngModelChange)='saveConfiguration(true)' - ) - .form-line(*ngIf='hostApp.platform !== Platform.Web') .header .title(translate) Debugging diff --git a/tabby-settings/src/components/windowSettingsTab.component.pug b/tabby-settings/src/components/windowSettingsTab.component.pug index a7b4d705dd..f3177bba65 100644 --- a/tabby-settings/src/components/windowSettingsTab.component.pug +++ b/tabby-settings/src/components/windowSettingsTab.component.pug @@ -121,6 +121,15 @@ h3.mb-3(translate) Window label.btn.btn-secondary(for='frameFull') span(translate) Full +.form-line(*ngIf='hostApp.platform !== Platform.Web && hostApp.platform !== Platform.Linux') + .header + .title(translate) Show tray + .description(translate) Show Tabby in tray or menu bar. + toggle( + [(ngModel)]='config.store.showTray', + (ngModelChange)='saveConfiguration(true)' + ) + h3.mt-4(translate) Docking .form-line(*ngIf='docking') From 8a49c738b4551838d718aa68f3e6aae4b41f5119 Mon Sep 17 00:00:00 2001 From: Charles Buffington Date: Tue, 18 Jun 2024 17:05:19 -0400 Subject: [PATCH 3/3] change from 'show tray' to 'hide tray' --- app/lib/app.ts | 3 ++- locale/en-GB.po | 4 ++-- tabby-core/src/configDefaults.yaml | 2 +- .../src/components/windowSettingsTab.component.pug | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/lib/app.ts b/app/lib/app.ts index 75a288c845..8a1406bf5f 100644 --- a/app/lib/app.ts +++ b/app/lib/app.ts @@ -183,9 +183,10 @@ export class Application { } enableTray (): void { - if (!!this.tray || process.platform === 'linux' || this.configStore.showTray === false) { + if (!!this.tray || process.platform === 'linux' || (this.configStore.hideTray ?? false) === true) { return } + if (process.platform === 'darwin') { this.tray = new Tray(`${app.getAppPath()}/assets/tray-darwinTemplate.png`) this.tray.setPressedImage(`${app.getAppPath()}/assets/tray-darwinHighlightTemplate.png`) diff --git a/locale/en-GB.po b/locale/en-GB.po index 1afee621fe..c7bdaaf319 100644 --- a/locale/en-GB.po +++ b/locale/en-GB.po @@ -2037,7 +2037,7 @@ msgid "Show Serial connections" msgstr "" #: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73 -msgid "Show Tabby in tray or menu bar." +msgid "Hide Tabby in tray or menu bar." msgstr "" #: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:152 @@ -2049,7 +2049,7 @@ msgid "Show toolbar" msgstr "" #: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73 -msgid "Show tray" +msgid "Hide tray" msgstr "" #: locale/tmp-html/tabby-settings/src/components/vaultSettingsTab.component.html:45 diff --git a/tabby-core/src/configDefaults.yaml b/tabby-core/src/configDefaults.yaml index 9b6244db81..096fa94210 100644 --- a/tabby-core/src/configDefaults.yaml +++ b/tabby-core/src/configDefaults.yaml @@ -43,7 +43,7 @@ enableWelcomeTab: true electronFlags: - ['force_discrete_gpu', '0'] enableAutomaticUpdates: true -showTray: true +hideTray: false version: 1 vault: null encrypted: false diff --git a/tabby-settings/src/components/windowSettingsTab.component.pug b/tabby-settings/src/components/windowSettingsTab.component.pug index f3177bba65..6ab08ca742 100644 --- a/tabby-settings/src/components/windowSettingsTab.component.pug +++ b/tabby-settings/src/components/windowSettingsTab.component.pug @@ -123,10 +123,10 @@ h3.mb-3(translate) Window .form-line(*ngIf='hostApp.platform !== Platform.Web && hostApp.platform !== Platform.Linux') .header - .title(translate) Show tray - .description(translate) Show Tabby in tray or menu bar. + .title(translate) Hide tray + .description(translate) Hide Tabby in tray or menu bar. toggle( - [(ngModel)]='config.store.showTray', + [(ngModel)]='config.store.hideTray', (ngModelChange)='saveConfiguration(true)' )