-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
on-workspace-touched
/on-workspace-redraw
callback
#316
Labels
Comments
To consider:
|
nikitabobko
changed the title
on-workspace-touched callback
Oct 11, 2024
on-workspace-touched
/on-workspace-redraw
callback
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The proposal is to introduce
on-workspace-touched
callback. When the workspace is updated in any way (focused changed to/from the workspace, children are attached/removed, name/tag is changed(oh,fuck, see below))Use case:
It'd require introduction of
workspace-mru-app-name
interpolation variable ("MRU" stands for "most recently used")Alternative names:
on-workspace-used
(similar to "MRU"),on-workspace-updated
(Does "focusing the workspace" update it?)Alternative. Allow interpolation variables directly inside
rename-workspace
?rename-workspace --tag %{workspace-mru-app-name}
. Then, for the consistency, they should be allowed in literally all commands.workspace %{next-workspace}
,focus --window-id %{left-window-id}
, etc. jeezProblem. Any command run inside the callback will probably change the workspace again.
rename-workspace
changes the workspace, which leads to infinite loop.Possible solutions:
on-workspace-children-changed
(sounds too specific. Is it useful in general case?)Don't do anything with this problem. Assume that the script inside is idempotent, which will cause recursion only onceI completely dislike it. At least because commands need to make sure no to call the callback if they detect that they noopDepends on: #245 #278
The text was updated successfully, but these errors were encountered: