Lid Angle Menu Bar Icon

Here's a lid angle preset that:

  • Puts the angle in your menu bar. Green above the cutoff (50˚), red below it.
  • Updates on lid movement (or left click).
  • Opens Lid Angle Sensor on right click.
  • Pause Spotify and dims screen when going below the cutoff.
  • Un-pause Spotify (if it was previously playing) and restore the screen brightness (to what it was before) when going above the cutoff.

It's easy to change the cutoff angle, change to your favorite music player, change colors or adapt it in any way you want.

image

It is using the generic device features, and not the new lid angle specific triggers, which means it should work without having to upgrade to alpha versions.

Lid Angle.bttpreset (30.1 KB)

@Pal , thank you for this. I'm facing strange behavior caused by the marked trigger:

If it is enabled if I press any modifier (CMD, OPT, SHIFT, CTRL), no matter where, the Menu bar icon "BTT version checker" trigger which is configured like this:

is disappearing (only while the modifier is pressed). Nothing is showing in "Recently used" which could explain this behavior.

Here's a little video:

@Andreas_Hegenberg , any ideas?

BTT Version: 5.612 (2025091502), but happens also on previous versions
macOS: 15.5 (24F74)

Could you post the json for your version checker item?

Here it is:

[
  {
    "BTTLastUpdatedAt" : 1757947510.1612291,
    "BTTTriggerType" : 681,
    "BTTTriggerTypeDescriptionReadOnly" : "Menubar Item: BTT version checker",
    "BTTTriggerTypeDescription" : "BTT version checker",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "8AD53227-A7B6-414E-B898-5695AC298236",
    "BTTAdditionalConfiguration" : "\/bin\/bash:::-c:::-:::",
    "BTTNotesInsteadOfDescription" : 1,
    "BTTNotes" : "Show menu bar icon\/text if installed BTT version differs from the last avaialble",
    "BTTOrder" : 16,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1757926764.2969198,
        "BTTTriggerParentUUID" : "8AD53227-A7B6-414E-B898-5695AC298236",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "3E96E6FF-C60A-479E-87EA-97EFFD19A542",
        "BTTPredefinedActionType" : 206,
        "BTTPredefinedActionName" : "Execute Shell Script  or  Task",
        "BTTShellTaskActionScript" : "btt_ver=$(curl -s https:\/\/folivora.ai\/releases\/ | head -n12 | \/opt\/homebrew\/bin\/ggrep -oP btt.*?.zip | uniq | head -n1 | grep \"[0-9]\\.[0-9]\\{3\\}\" -o); diff -y --suppress-common-lines <(echo \"$btt_ver\") <(defaults read com.hegenberg.BetterTouchTool version) &>\/dev\/null || echo -e \"$btt_ver\"",
        "BTTShellTaskActionConfig" : "\/bin\/bash:::-c:::-:::",
        "BTTOrder" : 278
      }
    ],
    "BTTGestureNotes" : "BTT version checker",
    "BTTTriggerConfig" : {
      "BTTTouchBarButtonLineHeight" : 0,
      "BTTTouchBarButtonColor" : "210.000003, 127.000000, 21.000001, 255.000000",
      "BTTTouchBarButtonTextAlignment" : 0,
      "BTTTouchBarItemIconWidth" : 22,
      "BTTTouchBarButtonTopMargin" : 0,
      "BTTTouchBarAlternateBackgroundColor" : "0.000000, 0.000000, 0.000000, 0.000000",
      "BTTTouchBarScriptUpdateInterval" : 3600,
      "BTTTouchBarButtonFontSize" : 15,
      "BTTTouchBarShellScriptString" : "btt_ver=$(curl -s https:\/\/folivora.ai\/releases\/ | head -n12 | \/opt\/homebrew\/bin\/ggrep -oP btt.*?.zip | uniq | head -n1 | grep \"[0-9]\\.[0-9]\\{3\\}\" -o); diff -y --suppress-common-lines <(echo \"$btt_ver\") <(defaults read com.hegenberg.BetterTouchTool version) &>\/dev\/null || echo -e \"$btt_ver\"",
      "BTTTouchBarAppleScriptStringRunOnInit" : false,
      "BTTTouchBarAppleScriptUsePath" : 0,
      "BTTTouchBarOnlyShowIcon" : false,
      "BTTTouchBarItemIconHeight" : 22,
      "BTTTouchBarButtonBaselineOffset" : 0,
      "BTTShellScriptDontTrimWhitepsace" : 0
    }
  }
]

Ah for some reason something is going wrong with the modifier based visibility. For now you can fix it by setting to to always visible:

// fixed in 5.618

2 Likes

I installed this preset, but I get the icon with the question marks always - no numbers.

What am I doing wrong? On the latest alpha build as of this writing.