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

How to close a window? #184

Closed
gutenye opened this issue Jun 17, 2017 · 3 comments
Closed

How to close a window? #184

gutenye opened this issue Jun 17, 2017 · 3 comments
Assignees
Milestone

Comments

@gutenye
Copy link

gutenye commented Jun 17, 2017

I've checked the API, does not found a method that close a window.

@mafredri
Copy link
Contributor

Seems you are right, maybe you're the first one to need this feature 😄. But it does seem like a feature that should be present in the API.

For now you could either rely on win.app().terminate(), or, if that's too heavy-handed:

Task.run('/usr/bin/osascript', [
	'-e',
	`tell app "${win.app().name()}" to close front window`,
]);

@kasper
Copy link
Owner

kasper commented Jun 19, 2017

I guess Cmd + W works for most. 😂 I’ll add it to the list.

@kasper kasper self-assigned this Dec 25, 2017
@kasper kasper added this to the 2.6 milestone Dec 25, 2017
kasper added a commit that referenced this issue Dec 25, 2017
@kasper
Copy link
Owner

kasper commented Dec 25, 2017

Implemented in master.

@kasper kasper closed this as completed Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants