Skip to content

Instantly share code, notes, and snippets.

@SebastianGrans
Last active November 13, 2022 21:48
Show Gist options
  • Save SebastianGrans/dbc243d8bb07623b229c10bfc6febd04 to your computer and use it in GitHub Desktop.
Save SebastianGrans/dbc243d8bb07623b229c10bfc6febd04 to your computer and use it in GitHub Desktop.
Various utility software that I use on MacOS

Update

I realized that almost all of these app can be installed easily via Brew. So first step would be to install Brew as instructed on their website.

Then simply run:

brew install iterm2 bettertouchtool bpython brave-browser vscodium vlc google-drive alt-tab git spotify monitorcontrol dozer

Apps not installed via Brew

Tweaks

Better touch tool

Remember to add the license.

Remap -d to Nothing

When I'm using a regular keyboard, my brain goes into Linux/Windows mode and I accidentally press "alt-d" to get to the address bar in the browsers. But "alt-d" represents -d which means "Add to Bookmark".

Copy and paste this into BTT to disable the "Add to Bookmark" shortcut. I never use it anyway.

[
  {
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTAdditionalConfiguration" : "1048584",
    "BTTEnabled2" : 1,
    "BTTKeyboardShortcutKeyboardType" : 1711,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "823F662B-83AD-47FE-A742-F3895156F351",
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 0,
    "BTTLayoutIndependentChar" : "d",
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTShortcutKeyCode" : 2,
    "BTTShortcutModifierKeys" : 1048576,
    "BTTOrder" : 0,
    "BTTDisplayOrder" : 0,
    "BTTAutoAdaptToKeyboardLayout" : 0
  }
]

Remap Home and End

This makes home and end behave like on Linux/Windows.

[
  {
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTLayoutIndependentActionChar" : "LEFT",
    "BTTAutoAdaptActionToKeyboardLayout" : true,
    "BTTShortcutToSend" : "55,123",
    "BTTAdditionalConfiguration" : "8388608",
    "BTTEnabled2" : 1,
    "BTTKeyboardShortcutKeyboardType" : 1711,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "96B1DFBA-8E84-4545-95B9-4553B4C427F0",
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 0,
    "BTTLayoutIndependentChar" : "HOME",
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTShortcutKeyCode" : 115,
    "BTTShortcutModifierKeys" : 8388608,
    "BTTOrder" : 3,
    "BTTDisplayOrder" : 0,
    "BTTAutoAdaptToKeyboardLayout" : 0
  },
  {
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTLayoutIndependentActionChar" : "RIGHT",
    "BTTAutoAdaptActionToKeyboardLayout" : true,
    "BTTShortcutToSend" : "55,124",
    "BTTAdditionalConfiguration" : "8388608",
    "BTTEnabled2" : 1,
    "BTTKeyboardShortcutKeyboardType" : 1711,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "65ED86DC-87E1-4425-AE1A-04D0DBDD5D37",
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 0,
    "BTTLayoutIndependentChar" : "END",
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTShortcutKeyCode" : 119,
    "BTTShortcutModifierKeys" : 8388608,
    "BTTOrder" : 4,
    "BTTDisplayOrder" : 0,
    "BTTAutoAdaptToKeyboardLayout" : 0
  }
]

Remap +Home and +End

The behaviour of +Home and +End on macOS is not the same as it is on Linux & Windows. We need to remap it to ++ and ++ respectively.

[
  {
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTLayoutIndependentActionChar" : "LEFT",
    "BTTAutoAdaptActionToKeyboardLayout" : true,
    "BTTShortcutToSend" : "56,55,123",
    "BTTAdditionalConfiguration" : "8519682",
    "BTTEnabled2" : 1,
    "BTTKeyboardShortcutKeyboardType" : 1711,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "0A7FC6A6-007C-41DD-9FCF-39E71908156F",
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 0,
    "BTTLayoutIndependentChar" : "HOME",
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTShortcutKeyCode" : 115,
    "BTTShortcutModifierKeys" : 8519680,
    "BTTOrder" : 0,
    "BTTDisplayOrder" : 0,
    "BTTAutoAdaptToKeyboardLayout" : 0
  }
]
[
  {
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTLayoutIndependentActionChar" : "RIGHT",
    "BTTAutoAdaptActionToKeyboardLayout" : true,
    "BTTShortcutToSend" : "56,55,124",
    "BTTAdditionalConfiguration" : "8519682",
    "BTTEnabled2" : 1,
    "BTTKeyboardShortcutKeyboardType" : 1711,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "6344C27D-40CD-47B2-8113-111ABF0C1A56",
    "BTTTriggerOnDown" : 1,
    "BTTNotesInsteadOfDescription" : 0,
    "BTTLayoutIndependentChar" : "END",
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTShortcutKeyCode" : 119,
    "BTTShortcutModifierKeys" : 8519680,
    "BTTOrder" : 1,
    "BTTDisplayOrder" : 0,
    "BTTAutoAdaptToKeyboardLayout" : 0
  }
]

Magic Mouse Two-finger click to middle-click

For opening links in new tabs or closing a tab.

[
  {
    "BTTTriggerType" : 20,
    "BTTTriggerTypeDescription" : "2 Finger Click",
    "BTTTriggerClass" : "BTTTriggerTypeMagicMouse",
    "BTTPredefinedActionType" : 1,
    "BTTPredefinedActionName" : "Middle Click",
    "BTTEnabled2" : 1,
    "BTTAlternateModifierKeys" : 0,
    "BTTRepeatDelay" : 0,
    "BTTUUID" : "051E6F7E-762D-4818-86C7-D138BD2E5C36",
    "BTTNotesInsteadOfDescription" : 0,
    "BTTEnabled" : 1,
    "BTTModifierMode" : 0,
    "BTTOrder" : 0,
    "BTTDisplayOrder" : 0
  }
]

Make home/end keys work in terminal

In the terminal, you can enter ^a and ^e for beginning and end of line respectively. So in iTerm, we need to remap the previous BTT remaps to send these commands.

So remap + to send hex code 0x01 and ⌘+to senx hex code0x05`.

Source: https://apple.stackexchange.com/questions/389525/how-do-i-do-home-and-end-in-iterm2

Bar None

For Bar None to work properly, you need to tweak the TouchBar settings. After this, pressing the Fn key will show and enable the control strip.

Screenshot 2022-06-21 at 17 23 28

AltTab

Modify the keybinding to +.

The apps

A short description of the apps installed with the command above.

BetterTouchTool

Very powerful tool which can do a lot of things. I mostly use it for window tiling and custom keybindings.

link

AltTab

Makes ⌘-↹ behave as is I expect it to. Similar to Windows and Linux.

link

Reflex

Disables the media keys inside web browser.
While browsing and listening to music, I would sometimes want to watch a video and thus need to pause the music. Instead of pausing the music, the media keys would pause the running video which is annoying.

link

MonitorControl

Makes it possible to adjust brightness on external monitors (assuming that they support the DCC protocol)

link

Dozer

Hides menubar icons. Perfect for hiding menu bar applications like MonitorControl and Reflex that you rarely need to interact with.

link

Amphetamine

Sometimes you just don't want your Mac to sleep. This app prevents that.

One example is for for the so called 'clamshell mode' which is essentially in 'docked mode'. I.e. you use an external monitor, mouse, and keyboard. This is normally only possible with the power cord connected, but by forcing the laptop to stay awake with Amphetamine, it can also be used while on battery.

link

Bar None

Disables the TouchBar unless you press the Fn key.

link

The keyboard settings must be modified to work as intended.

Screenshot 2022-06-21 at 17 23 28

smcFanControl

Broken: This doesn't seem to work anymore. Makes it possible to manually override the speed of the fans.

link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment