-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Lift limitations in on-window-detected.run
#20
Comments
on-window-detected
on-window-detected
on-window-detected
move-node-to-workspace
and layout
in on-window-detected
move-node-to-workspace
and layout
in on-window-detected
on-window-detected
on-window-detected
on-window-detected.run
I would like to use |
Being able to use the |
I'm using sketchybar and would like to only display those workspaces that are non empty + the currently focused one. So far, there is no robust way to:
I am solving it in a hacky and not foolproof way, basically with a trigger every time I change workspace or whenever an app is moved to another workspace, as well as when the front app changes. I thought I could do part of it by detecting any new window being opened, but I can't run an I understand the reason not to allow this would be not to execute any command that would create a window and suddenly we have an infinite cascade? |
I would like a "do nothing" command that just intercepts the event and stops further events from being called (with My use use case is that I'm often opening up Chrome debug windows, and my current setup has a rule to always send Chrome windows to a certain workspace when they're opened. I would like to setup a rule that just uses the default behavior of opening the dev tools window in the same workspace as the parent window so that I don't have to go looking for it. |
@vcooley have you tried to use empty array |
@nikitabobko I hadn't tried that, but had tried empty string. The empty array did the trick, thanks! |
I am doing the same (or at least I am trying). Do you have a workaround for this @dekked? Or is it possible to implement this in AeroSpace? cc @nikitabobko |
@dekked @tobiasgiese your use case is better covered by #230 which will be implemented in the next version |
|
It would be useful to be able to set the accordion layout for some of the workspaces, either in a workspace config or in the window detected be able to check if startup and set the right workspace layout |
I'd like the ability to set fullscreen for an application. I'm using it as a workaround to the big sur tabs issue in #68. |
I'd like to: [[on-window-detected]]
run = ['join-with right', 'mode main'] So each new window is automatically merged. Is there another way to do this? |
I'd love to [[on-window-detected]]
if.app-id = 'com.foo.bar'
run = 'layout fullscreen' so that a particular app is always open in apple fullscreen mode |
@dekked I'm currently using space_windows_change to update my workspaces on sketchybar when windows are created/destroyed, I haven't found a way yet to detect when a window is moved to a different workspace. |
@kronolynx I am using a dirty hack like alt-shift-1 = ['move-node-to-workspace 1', 'exec-and-forget sketchybar --trigger aerospace_workspace_change NEW_WORKSPACE=1' ] and a script that moves the workspace to the correct |
Can floating windows be configured to always be on top? I don't know if it's more of a OS thing |
In a tile layout, I would like my windows to automatically arrange themselves in a tree structure. For example, if I have 2 windows in h_tiles and I add a third one, I want it to be positioned in the bottom right corner of my screen like this: h_tiles h_tiles [[on-window-detected]] on-window-detected[0]: For now, 'layout floating', 'layout tiling' and 'move-node-to-workspace' are the only commands that are supported in 'on-window-detected'. Please report your use cases to #20 |
[[on-window-detected]]
if.window-title-regex-substring = "Alert window"
run = ["layout floating", "move-node-to-monitor 2"] I want it to appear on second monitor without taking the focus as the window is timed notification that will disappear in x seconds and sometime is not important. |
Same. For some apps, like VS Code, I like using the accordion layout but I can't find a way to do that. |
would love it support
|
I have a use case where one of my workspaces contains zellij + neovim on the entire screen. [[on-window-detected]]
if.app-id = 'net.kovidgoyal.kitty'
run = ['mode terminal']
[mode.terminal.binding]
alt-h = []
alt-j = []
alt-k = []
alt-l = []
.... Can be very beneficial. Also, this should probably be referenced with #412 as it will probably have a more complete solution for exiting the aforementioned |
I would like to have the option to set the accordion layout for a specific workspace. [[on-window-detected]] |
I wanted to not only make it float, but also put it in the center with rectangle's help [[on-window-detected]] |
I have some examples of commands that could be run with it:
|
I would also love that. Sometimes my floating windows are lost/hidden behind other windows.
Same for me: ms teams is opening windows in new windows, which is a bit annoying. To solve that I would like to change to accordion layout for this workspace whenever teams is opened:
Just in general: is there a reason why the actions that can be triggered by |
@dellacf the focus command allows to focus floating windows too, so you just need some shortcuts for it (defaults to |
Second this - I use the iTerm as a drop-down terminal and would love it to always be on the main monitor. |
… CmdResult This commit lays out the foundation for the following issues - #186 - #278 - #20 Also the commit changes how focused window is tracked throught the chain of executed commands. - CommandMutableState was a mutable state that tracked the focused window, and the track had to be updated throught the chain of executed commands (for example, take a look at the `focus` command) - CmdEnv is simplier. It just forces a particular window to be percieved as "focused". CmdEnv approach makes things easier to understand and describe in the docs (which I'm going to do later, CmdEnv will be exposed as AEROSPACE_FOCUSED_WORKSPACE and AEROSPACE_FOCUSED_WINDOW_ID environment variables) Unlike CommandMutableState, CmdEnv approach disallows to change focused window in on-window-detected, on-focus-changed, and other callbacks. Which I think is not an issue at all. It maybe even considered a safety mechanism. If a user uses `close` in one of the mentioned callbacks, previously, a random window could become focused and it would receive all the following commands. Now, all the commands that go after `close` will fail with "Invalid <window-id> \(windowId) specified in AEROSPACE_FOCUSED_WINDOW_ID env variable" - This commit is not a breaking change for on-window-detected thanks to limitations in #20 - But this commit is technically a breaking change for other mentioned callbacks, since no limitations were impoosed on those callbacks. But I don't believe that anyone in sane mind relied on it. And the docs are explicit that changing focus in those callbacks is a bad idea: > Changing the focus within these callbacks is a bad idea anyway, and the way it’s handled will probably change in future versions. Currently, the "force focused state" in CmdEnv is immutable, and I hope it will stay so. But hypothetically, it can be mutable in future versions if we decide that the embedded language #278 should allow chaning environment variables.
I group apps by spaces. For instance, R stands for "reading" and apps like LiquidText, Kindle, Preview go there. I don't normally use those apps side-by-side (i.e., tiling layout), so ideally I'd want them to be fullscreen and the space R to have accordion layout, so I can quickly switch between those apps. |
👍 on the 'resize'-related stuff that adjust layout and positioning. One particular reason this is necessary is that lots of apps have "naturally small" windows for particular purposes; and sometimes I would like those to be in the tiled grid, but I don't want them zoomed up to taking up ⅓ of the space on a Pro Display XDR. As a specific (but not the only) example, the However, if I set it to |
Also extremely interested in this! Seems strange to me to need to manually join to nest windows. |
Similar to @qskkk I'd like to implement an auto spiral/dwindle layout and there seems to be a pretty easy way to do this with the [[on-window-detected]]
if.node.layout = 'horizontal'
run = ['join-with left']
[[on-window-detected]]
if.node.layout = 'vertical'
run = ['join-with up'] |
Another use: There's (often?) bugs with some niche applications using application-hiding oddly (https://bluebird.app/), or a fullscreen-mode (many games), where that particular poorly-behaved application ends up leaving a "gap" in a tiled layout. With arbitrary commands, a workaround would be possible - detect the launch of those oddities, and set them to 'floating' mode, so they don't affect the grid. |
Hi, would it be possible to add the resize option in the [on-window-detected] ? I would love to use it to set certain apps that are in floating to a certain size on my screen. |
I would like to be able to automatically make secondary windows of a specific app accordion. For example, if I'm in Firefox and hit cmd+n to open a new window, I'd like it to automatically join the original Firefox window's layout and vertically accordion with it. |
Just to add to what's already been mentioned. Jetbrains IDE's allow you to combine/attach multiple windows into a single window on MacOS. (i.e Open new Project -> Attach Window) They appear as tabs above your editor tabs, which is a very nice feature. Aerospace interprets these as individual windows and attempts to tile them, which results in large blank spaces where these windows would normally be. (they remain attached to a single window, but Aerospace will display a blank tile for each additional window) A great way of handling this is to always join new jetbrains windows, and then put them in an accordion. It's really slick if you set the accordion gap to 0, and you essentially get to ALT-J/K through your open projects. The only hassle is that you have to micro-manage it. It would be great if we could automatically join up all jetbrains windows and set them to a vertical accordion layout. |
I believe that my use cases would be covered by suggestions made already, such as auto-full-screening and perhaps switching to accordion mode. But the use case I have has not been mentioned: running photo and video viewers from a file manager. I'm now using floating layout, but in i3 and sway I used to be able to run full-screen automatically and that was better. |
The limitations are:
The text was updated successfully, but these errors were encountered: