Skip to content

Commit

Permalink
Merge pull request Eugeny#9624 from C41M50N/feature/hide-tray
Browse files Browse the repository at this point in the history
add setting to hide tray (menubar for macos)
  • Loading branch information
Eugeny authored Jun 19, 2024
2 parents c681902 + 8a49c73 commit db2280e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ export class Application {
}

enableTray (): void {
if (!!this.tray || process.platform === 'linux') {
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`)
Expand Down
8 changes: 8 additions & 0 deletions locale/en-GB.po
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,10 @@ msgstr ""
msgid "Show Serial connections"
msgstr ""

#: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73
msgid "Hide 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 ""
Expand All @@ -2044,6 +2048,10 @@ msgstr ""
msgid "Show toolbar"
msgstr ""

#: locale/tmp-html/tabby-settings/src/components/windowSettingsTab.component.html:73
msgid "Hide tray"
msgstr ""

#: locale/tmp-html/tabby-settings/src/components/vaultSettingsTab.component.html:45
msgid "Show vault contents"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions tabby-core/src/configDefaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enableWelcomeTab: true
electronFlags:
- ['force_discrete_gpu', '0']
enableAutomaticUpdates: true
hideTray: false
version: 1
vault: null
encrypted: false
Expand Down
9 changes: 9 additions & 0 deletions tabby-settings/src/components/windowSettingsTab.component.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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) Hide tray
.description(translate) Hide Tabby in tray or menu bar.
toggle(
[(ngModel)]='config.store.hideTray',
(ngModelChange)='saveConfiguration(true)'
)

h3.mt-4(translate) Docking

.form-line(*ngIf='docking')
Expand Down

0 comments on commit db2280e

Please sign in to comment.