Support "AXIdentifier" filter windows in on-window-detected
callback
#1020
Replies: 9 comments
-
Have you found a workaround @Endy3032 ? EDIT: Any chance you could show your config for you workaround? Thank you :) |
Beta Was this translation helpful? Give feedback.
-
sorry for the late reply, the workaround i used isn't entirely accurate but i'll send anyway, hope it helps somewhat :D [[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
check-further-callbacks = true
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
if.window-title-regex-substring = '^[^Space|Little]'
check-further-callbacks = true
run = 'layout tiling' |
Beta Was this translation helpful? Give feedback.
-
Hey there, I'm an Arc user as well and thanks for your workaround, however, my Little Arc doesn't seem to have |
Beta Was this translation helpful? Give feedback.
-
Hey, I made a change to the regular expression - You might have been thinking of Luckily, Swift regular expressions include support for negative lookahead assertions. The snippet below works like a charm for me. (Also I removed
|
Beta Was this translation helpful? Give feedback.
-
@dev-msp Thanks for your answer, feeling quite a noob about that but I guess I'm missing something? Here is my config: # Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# It's not necessary to copy all keys to your config.
# If the key is missing in your config, "default-config.toml" will serve as a fallback
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = [
# 'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0'
]
# Start AeroSpace at login
start-at-login = true
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 30
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
key-mapping.preset = 'qwerty'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# on-focus-changed = 'move-mouse window-lazy-center'
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 10
inner.vertical = 10
outer.left = 15
outer.bottom = 15
outer.top = 15
outer.right = 15
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
[mode.main.binding]
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# You can uncomment this line to open up terminal with alt + enter shortcut
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app'
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-1 = 'workspace Space1'
alt-2 = 'workspace Space2'
alt-3 = 'workspace Space3'
alt-4 = 'workspace Space4'
alt-5 = 'workspace Space5'
alt-6 = 'workspace Space6'
alt-7 = 'workspace Space7'
alt-8 = 'workspace Space8'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
alt-shift-1 = ['move-node-to-workspace 1', 'workspace Space1']
alt-shift-2 = ['move-node-to-workspace 2', 'workspace Space2']
alt-shift-3 = ['move-node-to-workspace 3', 'workspace Space3']
alt-shift-4 = ['move-node-to-workspace 4', 'workspace Space4']
alt-shift-5 = ['move-node-to-workspace 5', 'workspace Space5']
alt-shift-6 = ['move-node-to-workspace 6', 'workspace Space6']
alt-shift-7 = ['move-node-to-workspace 7', 'workspace Space7']
alt-shift-8 = ['move-node-to-workspace 8', 'workspace Space8']
# Custom Kraty's Commands
alt-shift-f = 'fullscreen'
cmd-h = []
cmd-alt-h = []
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-semicolon = 'mode service'
# 'service' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
#s = ['layout sticky tiling', 'mode main'] # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layouti
backspace = ['close-all-windows-but-current', 'mode main']
alt-r = 'mode resize'
alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']
[mode.resize.binding] # 2. Declare 'resize' binding mode
minus = 'resize smart -50'
equal = 'resize smart +50'
[workspace-to-monitor-force-assignment]
Space1 = ['secondary', 'main']
Space2 = ['secondary', 'main']
Space3 = ['secondary', 'main']
Space4 = ['secondary', 'main']
# Little Arc
[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
check-further-callbacks = true
run = 'layout floating'
[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
if.window-title-regex-substring = '^(?!Space)'
check-further-callbacks = true
run = 'layout tiling'
# Automove
[[on-window-detected]]
if.app-id = 'com.jetbrains.rubymine'
check-further-callbacks = true
run = ['move-node-to-workspace Space2']
[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
check-further-callbacks = true
run = ['move-node-to-workspace Space1']
[[on-window-detected]]
if.app-id = 'com.spotify.client'
check-further-callbacks = true
run = ['move-node-to-workspace 8']
# Floating
[[on-window-detected]]
if.app-id = 'com.apple.finder'
check-further-callbacks = true
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'dev.warp.Warp-Stable'
check-further-callbacks = true
run = ['layout floating'] Thanks |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't follow. Are you saying it's not working? |
Beta Was this translation helpful? Give feedback.
-
Yeah it doesn't work for me 🤷 |
Beta Was this translation helpful? Give feedback.
-
Not sure how to help without more information. Assuming you've reloaded the config, and your debug-windows output from the original post still looks the same (Little Arc window titles beginning with "Space"), I don't see why this shouldn't work. On the off chance we're running different versions, here's what I get from
|
Beta Was this translation helpful? Give feedback.
-
it seems that rebooting the computer did the trick 🤷 , thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Arc Browser has a feature called "Little Arc", essentially a temporary "popup" window that is not meant to be tiled
Filtering by app/window name to check whether the window should tile or float is not enough since the popup window's title doesn't have anything to differentiate from normal windows, aside from the
AXIdentifier
property beingOptional(littleBrowserWindow-UUID)
instead of the normal window'sOptional(bigBrowserWindow-UUID)
The only workarounds I've found is to check whether the title starts with "Space" but that would fail if the space name is not renamed to anything other than "Space [number]", and checking if the title starts with "Little" seemingly only works for popups that are opened with the "Contact the Team" option in the browser (which is quite weird).
I've suggested them to mark little arc windows as dialogs but it'd be great to get more filters implemented in the
on-window-detected
callback too (if it's viable ofc)Edit:
aerospace debug-windows
outputNormal window
Little Arc
Beta Was this translation helpful? Give feedback.
All reactions