Open nikitabobko opened 1 year ago
I would like to use resize width 250
to be able to force some layout. I'm using it to have terminal on the left and small iOS simulator on the right side. Probably move-through left
would be useful as well.
Being able to use the resize
command inside on-window-detected
would be useful. In my case, I'd like the mobile emulators to start with a smaller width.
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 execute-and-forget
command to signal sketchybar :)
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 check-further-callbacks = false
).
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 run = []
?
@nikitabobko I hadn't tried that, but had tried empty string. The empty array did the trick, thanks!
I'm using sketchybar and would like to only display those workspaces that are non empty + the currently focused one.
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
So far, there is no robust way to:
- Detect a new window being openend, and signal sketchybar that it should recompute which workspaces are active.
- Do the same thing when a window is closed, or conversely, when a workspace becomes empty.
@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
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:
* Detect a new window being openend, and signal sketchybar that it should recompute which workspaces are active. * Do the same thing when a window is closed, or conversely, when a workspace becomes empty.
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
execute-and-forget
command to signal sketchybar :)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?
@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 display workspace. Not the best, but it does the job
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 ├── window 1 └── v_tiles ├── window 2 └── window 3 And when a fourth window is opened, it should resize into this layout:
h_tiles └── v_tiles ├── window 1 └── window 4 └── v_tiles ├── window 2 └── window 3 I tried to achieve this using a bash script triggered by the command:
[[on-window-detected]] check-further-callbacks = true run = ['exec-and-forget ~/.scripts/layout.sh'] But I encountered this error:
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 https://github.com/nikitabobko/AeroSpace/issues/20 If you need help with this issue or want to know how to work around it, let me know!
[[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.
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
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 close
action so that it can auto close the non meeting zoom window when Zoom app is opened by a meeting link:
[[on-window-detected]]
if.app-id = 'us.zoom.xos'
if.window-title-regex-substring = 'Zoom Workplace'
run = 'close'
I have a use case where one of my workspaces contains zellij + neovim on the entire screen. I'd like to unbind most aerospace related keys as this is the only window in the workspace for me, So doing something like:
[[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 https://github.com/nikitabobko/AeroSpace/issues/412 as it will probably have a more complete solution for exiting the aforementioned terminal
mode once the window is not the terminal and the mode is set to terminal
I would like to have the option to set the accordion layout for a specific workspace.
[[on-window-detected]] if.workspace = 'Z' check-further-callbacks = true run = 'layout accordion'
I wanted to not only make it float, but also put it in the center with rectangle's help
[[on-window-detected]] if.app-id = 'com.google.Chrome' if.window-title-regex-substring = 'Sign In - Google Accounts' run = ['layout floating', 'exec-and-forget open -g "rectangle://execute-action?name=center"']
I have some examples of commands that could be run with it:
resize
-- to allow set different sizes for windows, this is especially useful for floating windows, either to use custom sizes or create quake mode (e.g. Dropdown terminal).move
-- to place new window on specific position.position
-- (new) sets position for floating windows.exec-and-forget
-- for many custom commands, especially used with the upcoming tree
commandCan floating windows be configured to always be on top? I don't know if it's more of a OS thing
I would also love that. Sometimes my floating windows are lost/hidden behind other windows.
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
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:
[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
run = 'layout accordion'
Just in general: is there a reason why the actions that can be triggered by on-window-detected
is so restricted?
Can floating windows be configured to always be on top? I don't know if it's more of a OS thing
I would also love that. Sometimes my floating windows are lost/hidden behind other windows.
@dellacf the focus command allows to focus floating windows too, so you just need some shortcuts for it (defaults to alt-hjkl
, I use cmd + arrows
).
[[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.
Second this - I use the iTerm as a drop-down terminal and would love it to always be on the main monitor.
@dellacf the focus command allows to focus floating windows too, so you just need some shortcuts for it (defaults to
alt-hjkl
, I usecmd + arrows
).
I know, I just don't like that the floating windows are hidden behind my tilling windows.
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.
:+1: 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 Tags
window in Things 3 is a separate window instead of a drawer, and I do want it open (and not occluding the main window / 'floating') during normal usage of the app:
However, if I set it to layout tiling
, I end up with this ridiculousness every time I open the app:
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?
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
callback, but it's missing the ability to run join-with
commands and the ability to check the layout of the current node. Something like:
[[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. A simple option to center elements would also be great. I'm using Hammerspoon right now to re-center all the floating windows at the moment, but it would be much easier if you could add a 'center-window' option, furthermore than the resize option. Thanks a lot, keep up the great work!
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.
The limitations are: