Window centering and resizing

I am not sure how to make use of Center Window and Move/Resize actions to center my active window and resize it to a custom size after I double-click on window’s title bar.

In the video you can see I'm trying to click on the title bar and height is randomly set. Also, 30% of my clicks are, for some reason, ignored. I have macOS’ default double-click behavior set to Do Nothing.

I have an external monitor attached to my MacBook Pro.

[
  {
    "BTTLastUpdatedAt" : 1758786321.8452811,
    "BTTTriggerType" : 600,
    "BTTTriggerTypeDescriptionReadOnly" : "Doubleclick Window Titlebar",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
    "BTTOrder" : 1,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1758786365.383858,
        "BTTTriggerParentUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "BFC05138-FBF8-40E7-BECF-13FE6E9D02AE",
        "BTTPredefinedActionType" : 97,
        "BTTPredefinedActionName" : "Center Window",
        "BTTOrder" : 0
      },
      {
        "BTTLastUpdatedAt" : 1758786365.3838871,
        "BTTTriggerParentUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "BAB551CB-D885-4B3B-9BD6-E0205013C3BC",
        "BTTPredefinedActionType" : 251,
        "BTTPredefinedActionName" : "Custom Move  or  Resize Window",
        "BTTActionMoveResizeConfig" : "{\"BTTChangeWidthRelative\":1,\"BTTOriginToUse\":0,\"BTTChangeWindowWidth\":true,\"BTTCareForStageManager\":false,\"BTTActiveOrHoveredWindow\":0,\"BTTNewWindowWidthAbsoluteAddition\":0,\"BTTChangeHeightRelative\":1,\"BTTNewWindowHeightAbsoluteAddition\":0,\"BTTOriginDisplay\":0,\"BTTChangeXOriginRelative\":0,\"BTTNewWindowWidthRelative\":50,\"BTTChangeYOriginRelative\":0,\"BTTUseVisibleFrame\":false,\"BTTNewWindowHeightRelative\":90,\"BTTScreenOrigin\":0,\"BTTChangeWindowHeight\":true,\"BTTDirectionToMove\":0,\"BTTScreensToMove\":0}",
        "BTTOrder" : 1
      },
      {
        "BTTLastUpdatedAt" : 1758786365.383873,
        "BTTTriggerParentUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "63444073-B9D1-47BD-974F-9C5236D6AF3F",
        "BTTPredefinedActionType" : 254,
        "BTTPredefinedActionName" : "Show HUD Overlay",
        "BTTHUDActionConfiguration" : "{\"BTTActionHUDBlur\":true,\"BTTActionHUDBackground\":\"0.000000, 0.000000, 0.000000, 0.000000\",\"BTTIconConfigImageHeight\":100,\"BTTActionHUDPosition\":0,\"BTTActionHUDDetail\":\"\",\"BTTActionHUDDuration\":0.90000000000000002,\"BTTActionHUDDisplayToUse\":0,\"BTTIconConfigImageWidth\":100,\"BTTActionHUDSlideDirection\":0,\"BTTActionHUDHideWhenOtherHUDAppears\":false,\"BTTActionHUDWidth\":220,\"BTTActionHUDAttributedTitle\":\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\cocoartf2822\\n\\\\cocoatextscaling0\\\\cocoaplatform0{\\\\fonttbl\\\\f0\\\\fnil\\\\fcharset0 SFPro-Bold;\\\\f1\\\\fswiss\\\\fcharset0 Helvetica;\\\\f2\\\\fnil\\\\fcharset0 SFPro-Regular;\\n}\\n{\\\\colortbl;\\\\red255\\\\green255\\\\blue255;\\\\red0\\\\green0\\\\blue0;}\\n{\\\\*\\\\expandedcolortbl;;\\\\cssrgb\\\\c0\\\\c0\\\\c0\\\\c84706\\\\cname labelColor;}\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f0\\\\b\\\\fs80 \\\\cf2 test\\n\\\\f1\\\\b0\\\\fs24 \\\\\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f2\\\\fs48 \\\\cf2 test2}\",\"BTTActionHUDBorderWidth\":0,\"BTTActionHUDTitle\":\"\",\"BTTActionHUDHeight\":220}",
        "BTTOrder" : 2
      }
    ]
  }
]

I would recommend to configure it only with the custom move & resize action:

[
  {
    "BTTLastUpdatedAt" : 1758786942.8488021,
    "BTTTriggerType" : 600,
    "BTTTriggerTypeDescriptionReadOnly" : "Doubleclick Window Titlebar",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
    "BTTOrder" : 0,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1758786942.8487701,
        "BTTTriggerParentUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "BAB551CB-D885-4B3B-9BD6-E0205013C3BC",
        "BTTPredefinedActionType" : 251,
        "BTTPredefinedActionName" : "Custom Move  or  Resize Window",
        "BTTActionMoveResizeConfig" : "{\"BTTOriginDisplay\":0,\"BTTChangeYOriginRelative\":0,\"BTTScreenOrigin\":0,\"BTTDirectionToMove\":0,\"BTTChangeHeightRelative\":1,\"BTTScreensToMove\":0,\"BTTNewYAbsolute\":0,\"BTTNewXRelative\":0,\"BTTOriginToUse\":0,\"BTTNewWindowWidthRelative\":50,\"BTTChangeWindowWidth\":true,\"BTTNewWindowWidthAbsoluteAddition\":0,\"BTTNewXAbsolute\":0,\"BTTNewWindowHeightAbsoluteAddition\":0,\"BTTUseVisibleFrame\":true,\"BTTChangeYOrigin\":1,\"BTTCareForStageManager\":false,\"BTTChangeXOriginRelative\":0,\"BTTChangeWidthRelative\":1,\"BTTActiveOrHoveredWindow\":0,\"BTTNewWindowHeightRelative\":90,\"BTTChangeWindowHeight\":true,\"BTTNewYRelative\":0,\"BTTChangeXOrigin\":1}",
        "BTTActionMoveResizeName" : "center & resize",
        "BTTOrder" : 1
      },
      {
        "BTTLastUpdatedAt" : 1758786890.2215829,
        "BTTTriggerParentUUID" : "E485668B-43CB-4E7B-A64E-E1266BA0C58E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "63444073-B9D1-47BD-974F-9C5236D6AF3F",
        "BTTPredefinedActionType" : 254,
        "BTTPredefinedActionName" : "Show HUD Overlay",
        "BTTHUDActionConfiguration" : "{\"BTTActionHUDBlur\":true,\"BTTActionHUDBackground\":\"0.000000, 0.000000, 0.000000, 0.000000\",\"BTTIconConfigImageHeight\":100,\"BTTActionHUDPosition\":0,\"BTTActionHUDDetail\":\"\",\"BTTActionHUDDuration\":0.90000000000000002,\"BTTActionHUDDisplayToUse\":0,\"BTTIconConfigImageWidth\":100,\"BTTActionHUDSlideDirection\":0,\"BTTActionHUDHideWhenOtherHUDAppears\":false,\"BTTActionHUDWidth\":220,\"BTTActionHUDAttributedTitle\":\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\cocoartf2822\\n\\\\cocoatextscaling0\\\\cocoaplatform0{\\\\fonttbl\\\\f0\\\\fnil\\\\fcharset0 SFPro-Bold;\\\\f1\\\\fswiss\\\\fcharset0 Helvetica;\\\\f2\\\\fnil\\\\fcharset0 SFPro-Regular;\\n}\\n{\\\\colortbl;\\\\red255\\\\green255\\\\blue255;\\\\red0\\\\green0\\\\blue0;}\\n{\\\\*\\\\expandedcolortbl;;\\\\cssrgb\\\\c0\\\\c0\\\\c0\\\\c84706\\\\cname labelColor;}\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f0\\\\b\\\\fs80 \\\\cf2 test\\n\\\\f1\\\\b0\\\\fs24 \\\\\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f2\\\\fs48 \\\\cf2 test2}\",\"BTTActionHUDBorderWidth\":0,\"BTTActionHUDTitle\":\"\",\"BTTActionHUDHeight\":220}",
        "BTTOrder" : 2
      }
    ]
  }
]
1 Like

Thanks, @Andreas_Hegenberg! That was it. Also, is it possible some applications are handling this internally somehow and BetterTouchTool isn’t getting the event to apply this action? For example, when I click on Zed (code editor) titlebar, it zooms the window to fill the screen.

in theory that is possible, although it is a bit weird that an app would handle this.

Maybe BTT can not recognize the titlebar of Zed - I’ll check

1 Like

Yeah, super-weird, because I have macOS system-wide setting set to do nothing, and yet Zed resizes its window to fill the screen (not fullscreen, but zoom).

@Andreas_Hegenberg, maybe I could test this somehow for you?

It is definitely some integrated logic in Zed that is executed regardless of the macOS setting. They should probably fix this to check the macOS setting. ([[[NSUserDefaults standardUserDefaults] persistentDomainForName:NSGlobalDomain] objectForKey:@"AppleActionOnDoubleClick"])

You can workaround it like this:

(instead of the hud action assign your custom resize action)

1 Like

Ok, thanks so much for looking into it! I will report this on their GitHub page.