nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
6.59k stars 105 forks source link

Kap screen video recorder workaround needed to record properly #138

Closed kackburt closed 8 months ago

kackburt commented 8 months ago

I am not sure to call it an "issue", but I rather wanted to try to help other users who face this...

Since the screen recorder app "Kap" is detected as a new window it get's applied to the current layout. Therefor it can (especially when using tiles) get hardly possible to screen capture properly, since Kap is designed to overlay on top of all current windows and the user should define an area/window/fullscreen to capture. So f.e. it can look something like this: image

Workaround that work's for me: adding [[on-window-detected]] rule

[[on-window-detected]]
if.app-id = 'com.wulkano.kap'
run = 'layout floating'

When using this addition in the config it looks (and works) like this: image

nikitabobko commented 8 months ago

Please don't forget to attach debug-windows output next time:

The Kap semi-transparent sheet window properties are:

com.wulkano.kap.window.1976 recognizedAsDialog: false
com.wulkano.kap.window.1976 AXUIElement: <AXUIElement 0x600000e06dc0> {pid=48644}
com.wulkano.kap.window.1976 windowId: 1976
com.wulkano.kap.window.1976 workspace: W
com.wulkano.kap.window.1976 AXTitle: 'Optional(Kap)'
com.wulkano.kap.window.1976 AXRole: 'Optional(AXWindow)'
com.wulkano.kap.window.1976 AXSubrole: 'Optional(AXStandardWindow)'
com.wulkano.kap.window.1976 AXFocused: 'Optional(0)'
com.wulkano.kap.window.1976 AXFullScreen: 'Optional(0)'
com.wulkano.kap.window.1976 AXChildrenInNavigationOrder: not-nil
com.wulkano.kap.window.1976 AXFrame: 'Optional(<AXValue 0x60000155ba00> {value = x:900.000000 y:44.000000 w:1800.000000 h:1169.000000 type = kAXValueCGRectType})'
com.wulkano.kap.window.1976 AXPosition: 'Optional(<AXValue 0x600000e15680> {value = x:900.000000 y:44.000000 type = kAXValueCGPointType})'
com.wulkano.kap.window.1976 AXGrowArea: 'nil'
com.wulkano.kap.window.1976 AXMinimizeButton: 'Optional(<AXUIElement 0x600000e15680> {pid=48644})'
com.wulkano.kap.window.1976 AXDocument: 'nil'
com.wulkano.kap.window.1976 AXSections:
com.wulkano.kap.window.1976     Optional(<__NSArray0 0x1e66afa00>(
com.wulkano.kap.window.1976     )
com.wulkano.kap.window.1976     )
com.wulkano.kap.window.1976 AXCloseButton: 'Optional(<AXUIElement 0x600000e10de0> {pid=48644})'
com.wulkano.kap.window.1976 AXMain: 'Optional(1)'
com.wulkano.kap.window.1976 AXActivationPoint: 'Optional(<AXValue 0x600000e14150> {value = x:-1.000000 y:1170.000000 type = kAXValueCGPointType})'
com.wulkano.kap.window.1976 AXFullScreenButton: 'Optional(<AXUIElement 0x600000e10de0> {pid=48644})'
com.wulkano.kap.window.1976 AXProxy: 'nil'
com.wulkano.kap.window.1976 AXDefaultButton: 'nil'
com.wulkano.kap.window.1976 AXMinimized: 'Optional(0)'
com.wulkano.kap.window.1976 AXChildren: not-nil
com.wulkano.kap.window.1976 AXParent: 'Optional(<AXUIElement Application 0x600000e14150> {pid=48644})'
com.wulkano.kap.window.1976 AXTitleUIElement: 'nil'
com.wulkano.kap.window.1976 AXCancelButton: 'nil'
com.wulkano.kap.window.1976 AXModal: 'Optional(0)'
com.wulkano.kap.window.1976 AXZoomButton: 'Optional(<AXUIElement 0x600000e10de0> {pid=48644})'
com.wulkano.kap.window.1976 AXRoleDescription: 'Optional(standard window)'
com.wulkano.kap.window.1976 AXSize: 'Optional(<AXValue 0x600000e10de0> {value = w:1800.000000 h:1169.000000 type = kAXValueCGSizeType})'
com.wulkano.kap.window.1976 AXToolbarButton: 'nil'
com.wulkano.kap             AXUIElement: <AXUIElement Application 0x600000e067f0> {pid=48644}
com.wulkano.kap             AXRole: 'Optional(AXApplication)'
com.wulkano.kap             AXTitle: 'Optional(Kap)'
com.wulkano.kap             AXFunctionRowTopLevelElements:
com.wulkano.kap                 Optional(<__NSArray0 0x1e66afa00>(
com.wulkano.kap                 )
com.wulkano.kap                 )
com.wulkano.kap             AXFrame: 'nil'
com.wulkano.kap             AXChildren: not-nil
com.wulkano.kap             AXFocusedUIElement: 'nil'
com.wulkano.kap             AXFrontmost: 'Optional(1)'
com.wulkano.kap             AXExtrasMenuBar: 'Optional(<AXUIElement 0x600000e10000> {pid=48644})'
com.wulkano.kap             AXMainWindow: 'Optional(<AXUIElement 0x600000e157a0> {pid=48644})'
com.wulkano.kap             AXFocusedWindow: 'Optional(<AXUIElement 0x600000e10000> {pid=48644})'
com.wulkano.kap             AXChildrenInNavigationOrder: not-nil
com.wulkano.kap             AXEnhancedUserInterface: 'Optional(0)'
com.wulkano.kap             AXPreferredLanguage: 'Optional(en_GB)'
com.wulkano.kap             AXRoleDescription: 'Optional(application)'
com.wulkano.kap             AXHidden: 'Optional(0)'
com.wulkano.kap             AXMenuBar: 'Optional(<AXUIElement 0x600000e10000> {pid=48644})'
com.wulkano.kap             AXWindows:
com.wulkano.kap                 Optional(<__NSArrayM 0x600000e157a0>(
com.wulkano.kap                 <AXUIElement 0x600000e16b50> {pid=48644}
com.wulkano.kap                 )
com.wulkano.kap                 )
com.wulkano.kap             AXSize: 'nil'
com.wulkano.kap             AXPosition: 'nil'
nikitabobko commented 8 months ago

Released in 0.8.3