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

Feature: on-focus-changed callback #230

Open
nikitabobko opened this issue May 17, 2024 · 3 comments
Open

Feature: on-focus-changed callback #230

nikitabobko opened this issue May 17, 2024 · 3 comments

Comments

@nikitabobko
Copy link
Owner

AeroSpace already has two callbacks: on-window-detected and exec-on-workspace-changed

It'd be cool to have one more callback to track when the focus changes

@garo
Copy link

garo commented Jun 10, 2024

I have another use case where this would probably be useful: I'd like to define a minimum window size for some applications, so that on-focus event would enlarge the app window to be at least the defined minimum size. I guess this would also require an additional command or an option to resize command to support the at-least principle.

@nikitabobko
Copy link
Owner Author

@garo why can't you use on-window-detected for that? Set the minimum size once and don't touch it anymore

@garo
Copy link

garo commented Jun 10, 2024

@garo why can't you use on-window-detected for that? Set the minimum size once and don't touch it anymore

I have this especially with how I'm using Slack: I like to keep Slack in one Workspace together with a browser and I'm often shrinking Slack to have more space for the browser. Then when I do focus Slack I'd like it to grow bigger. I've just switched from Amethyst and that somehow supported this out-of-the-box and I noticed I'm missing this feature. I figured out I probably could emulate this with the hypotechical on-focus callback and move command.

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

No branches or pull requests

2 participants