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

restore last window bounds #324

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mariodian
Copy link
Contributor

@mariodian mariodian commented Jun 3, 2023

fixes #323

Saves the last window size and position and restores it on the next run.

It uses electron-store to store the bounds in ~/Application Support/better-chatpgt/config.json (for Mac, not sure where it saves in Linux and Windows)

@@ -52,7 +76,7 @@ const createTray = (window) => {
{
label: 'Show',
click: () => {
win.maximize();
setWindowBounds(window);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what Tray() should be in MacOS because I see no menu with "Show" label anywhere. If anyone could test it on Windows and Linux it would be great.

@@ -66,7 +90,7 @@ const createTray = (window) => {
]);

tray.on('click', () => {
win.maximize();
setWindowBounds(window);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what Tray() should be in MacOS because I see no menu with "Show" label anywhere. If anyone could test it on Windows and Linux it would be great.

@mariodian mariodian changed the title restore last window bounds #323 restore last window bounds Jun 3, 2023
@mariodian
Copy link
Contributor Author

rebased

@mariodian
Copy link
Contributor Author

rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window max size on new start
1 participant