Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Dock Icon + Main Window #35

Closed
PascalPixel opened this issue Dec 15, 2022 · 6 comments
Closed

Hide Dock Icon + Main Window #35

PascalPixel opened this issue Dec 15, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@PascalPixel
Copy link

Love the menubar dropdown, it's excellent! Can we get rid of the dock icon and main window altogether? 😄 It currently just 'hides' the main window when you click 'close'.

Screenshot 2022-12-15 at 15 20 21

Screenshot 2022-12-15 at 15 19 55

@lencx
Copy link
Owner

lencx commented Dec 15, 2022

This is possible, but once implemented, both dock and menu will disappear (shortcuts will still be available, but without menus as hints, it will be difficult for users to remember them). If the menu is placed on the system tray, they would be stacked on top of each other, it will affect the user experience. I haven't thought of a good form of interaction yet.

#[cfg(target_os = "macos")]
app.set_activation_policy(tauri::ActivationPolicy::Prohibited);

tray-menu

@lencx lencx added the enhancement New feature or request label Dec 16, 2022
@lencx
Copy link
Owner

lencx commented Dec 16, 2022

I came up with a better form of interaction.

  • If the app is still in the dock there are two ways to hide it:
    • Triggered by the menu item Menu -> Preferences -> Hide Dock Icon
    • triggered by a right-click event on the system tray icon
  • When it needs to be in the dock there is only one way: it can only be restored by a right-click event on the system tray icon

Simply put, a right-click on the system tray icon is a two-way event (show ⇋ hide)

chat-hide-dock

lencx added a commit that referenced this issue Dec 16, 2022
@PascalPixel
Copy link
Author

This is great! Some other macOS menubar apps I have that have the option to 'disable the dock icon and app switcher', seem to follow the pattern of:

  • are you sure you want this mode? restart is required (ok)
  • menu item left-click to toggle window
  • menu item right-click to get app menu

@lencx
Copy link
Owner

lencx commented Dec 17, 2022

If a system tray right-click menu is required, it would be a simple version of:

  • Control Center
  • Show Dock icon
  • Quit

Control Center is important and I am implementing exciting features for it.

@lencx lencx closed this as completed Dec 17, 2022
@PascalPixel
Copy link
Author

Thanks @lencx !

@lencx
Copy link
Owner

lencx commented Dec 17, 2022

You can check out readme, which also adds more exciting features, but was released in a bit of a hurry and is not yet fully adapted in the system tray.

sbnewsthailand pushed a commit to sbnewsthailand/ChatGPT that referenced this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants