ankurk91 / google-chat-electron

An unofficial desktop app for Google Chat :electron:
GNU General Public License v3.0
162 stars 49 forks source link

[Mac] Add "Hide app" and "Hide others" menu items #119

Open jacob-carlborg-apoex opened 2 years ago

jacob-carlborg-apoex commented 2 years ago

All macOS application have a couple of standard menu items. google-chat-electron is missing the "Hide google-chat-electron" and "Hide Others" menu items. These are located in the application menu. Here's an example screenshot from TextMate how the these menu items can look like (you can see the keyboard shortcuts as well):

Screen Shot 2022-09-29 at 10 42 31
ankurk91 commented 2 years ago

Unfortunately i no longer i have mac os vm to run this app into, i will try to install the vm soon.

As far as i remember, this app already have "Hide" menu. How can an app can hide other apps? Need to check if it is a native electron.js feature.

jacob-carlborg-apoex commented 2 years ago

As far as i remember, this app already have "Hide" menu.

No, it has a menu item "Close To Tray". This has the keyboard shortcut ⌘W. The standard keyboard shortcut for "Hide" is ⌘H. "Close To Tray" closes the window but the application is still active. It also has a different keyboard shortcut. The ⌘W keyboard shortcut is usually used for closing a tab or window for document based applications. The ⌘W keyboard shortcut doesn't really make sense for google-chat-electron on macOS, because it can only, as far as I know, have one window. It's not a document based application.

Screen Shot 2022-10-17 at 13 30 07

How can an app can hide other apps? Need to check if it is a native electron.js feature.

There's an API for that https://developer.apple.com/documentation/appkit/nsworkspace/1530417-hideotherapplications.

The most important one (for me at least) is "Hide" and that is has the keyboard shortcut ⌘H, I'm so used to using that keyboard shortcut.

I've included a screenshot from Slack as well below. As far as I know, Slack is an Electron based application as well.

Screen Shot 2022-10-17 at 13 38 18
ankurk91 commented 2 years ago

Thanks, i will consider your opinion soon