Core Concepts
/

Scopes

A `Scope` encapsulates the concept of commands or command-extensions only applying in certain scenarios such as when a certain application is active, or an arbitrary function evaluates to `true`

Registering a scope

The following registers and returns a `Scope` instance:

unboundmusic/bd1171d52a32148964f59960e289f795

Check if a scope is active

unboundmusic/a3399248d6a5ff76a24fd3713bcec532

Hierarchical Scopes

If several scopes naturally have a hierarchical or parent-child relationship, the scope definition can reflect that. This way child scopes will be evaluated before any of their ancestors, making sure the "deepest" scope wins. For example, if you had a "my-project" scope, and as children of that scope "my-project:js", and "my-project:css" scopes defined to be active based on which type of file you are currently editing. You might have some generic commands or translations defined for your "my-project" scope, but if you are in a .js or .css file, then the corresponding child scope should take precedence, even though your "my-project" scope is still active. This could be defined like:

unboundmusic/6d45305d744e6088b33d14ac739dee24

Determine the Bundle ID for an application

From the command line

`osascript -e 'id of app "Google Chrome"'`

By voice command

Use the `darwin:get-app-bundle-id` command @script bundle id <application name>@, or switch to the desired application, and just say @script bundle [email protected], and the bundle ID will be placed in your clipboard.