-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Comments
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 |
@garo why can't you use |
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 |
Implemented in 0.13.0-Beta |
@nikitabobko using
on-focus-changed = [
'exec-and-forget sketchybar --trigger aerospace_workspace_change FOCUS_CHANGE=true'
] my event script: if [[ "$FOCUS_CHANGE" == "true" ]]; then
FOCUSED_WORKSPACE="$(aerospace list-workspaces --focused)"
if [[ "$NAME" = "space.$FOCUSED_WORKSPACE" ]]; then
rewriteSketchybar "$FOCUSED_WORKSPACE"
fi
fi Is it maybe possible to add the focused workspace to every event? This would reduce alot of aerospace queries. |
Yes, that makes sense. I planned to expose it to the callbacks as an environment variable. Feel free to open a tracking issue for it |
AeroSpace already has two callbacks:
on-window-detected
andexec-on-workspace-changed
It'd be cool to have one more callback to track when the focus changes
The text was updated successfully, but these errors were encountered: