Dim inactive windows

Hi Andreas, is there some macOS API, which can be used to dim all inactive windows (on multi-monitor setup) or maybe not only the windows but everything except menu bar + dock? Ideally this should allow configurable level of dimming.

I use dimming in my terminal, since I have multiple splits and it is really handy to know which one is the active one and I was wondering if this useful and productive feature is possible via BTT. I can imagine a whole bunch of workflows, e.g. if active window is my terminal app/IDE, make everything else dimmer to not distract me, but still be able to see them if needed etc.

here is an example on how you can achieve this using a floating menu:
dim4.bttpreset (13.3 KB)
//edit: updated to not show on launch

It dims everything except the active window when you press cmd+shift+1 and undims when pressing cmd+shift+2. It does this by placing a full-size translucent empty floating menu behind the active window. The level of dimming can be changed by adjusting the opacity of the floating menu background color.

You could even completely blur out everything via the blur background option:

There seems to be some issue defining the menu width/height based on the variables, I'm currently looking into this.

Nice solution. Very clever. Thank you.

I've tried it briefly and tried to configure additional "permanent" floating menu for the unfocused screen, but I was not able to. Idea is not make sure only 1 window stands out across all screens.

Additionally if I use shortcuts to move the window between the 2 monitors, the floating menu stays on the one initially shown (I need to click on the window so that the floating menu is "transferred" to the correct screen and behind the focused window). If I use the mouse and drag the window to the other monitor - no issues. This is somewhat similar to the an issue described here, but in this case "Prevent Window From Moving Outside of FocusedScreen" is unchecked.

I've also tried to create an trigger "Focused Window Did Change":

[
  {
    "BTTActionCategory" : 0,
    "BTTLastUpdatedAt" : 1748595902.427417,
    "BTTTriggerType" : 784,
    "BTTTriggerTypeDescriptionReadOnly" : "Focused Window Did Change",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "C4F3480A-F9F3-40F4-B218-FD7A885813C7",
    "BTTPredefinedActionType" : 366,
    "BTTPredefinedActionName" : "Empty Placeholder",
    "BTTEnabled" : 1,
    "BTTEnabled2" : 1,
    "BTTOrder" : 13,
    "BTTAdditionalActions" : [
      {
        "BTTActionCategory" : 0,
        "BTTLastUpdatedAt" : 1748596006.0274429,
        "BTTTriggerParentUUID" : "C4F3480A-F9F3-40F4-B218-FD7A885813C7",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "9172C6DB-B828-4302-8B07-7E9D1665867A",
        "BTTPredefinedActionType" : 345,
        "BTTPredefinedActionName" : "Pause Execution  or  Delay Next Action (async  or  not blocking)",
        "BTTDelayNextActionBy" : "0.2",
        "BTTEnabled" : 1,
        "BTTEnabled2" : 1,
        "BTTOrder" : 0
      },
      {
        "BTTActionCategory" : 0,
        "BTTLastUpdatedAt" : 1748595996.560638,
        "BTTTriggerParentUUID" : "C4F3480A-F9F3-40F4-B218-FD7A885813C7",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "6910BE34-FF92-46EE-A8E6-D6B44EF84518",
        "BTTPredefinedActionType" : 386,
        "BTTPredefinedActionName" : "Show Floating Menu",
        "BTTAdditionalActionData" : {
          "BTTMenuActionMenuID" : "dim_screen2",
          "BTTMenuActionRestorePosition" : true
        },
        "BTTEnabled" : 1,
        "BTTEnabled2" : 1,
        "BTTOrder" : 1
      }
    ]
  }
]

which will always trigger the menu, but when switching between 2 apps, on 2 different monitors, using shortcuts, but the menu is not moving behind the newly focused window on the other screen.

you always need to do it like in the shortcut to ensure the floating menu is moved behind the active one

5.446 should improve the sizing behavior (uploading now)

Currently there is no good way to show such a "dimmer" / floating menu on all the un-focused screens. However I have already planned a way to achieve this (initially for another feature) and it should become available soon.

1 Like

Yeah, this solves it! Thanks.

I'm looking at your video and screenshot, but I cannot see the button/text for adding new items:

Is there a way to hide it without adding item to the menu?

you need to add at least one dummy item, it can be fully transparent (the current version of the preset linked above already contains one)

There is still one issue where it sometimes shows up on the wrong screen... will be fixed in a few minutes, I think this will also solve some other floating menu positioning issues.

1 Like