Component: Alias

The alias component is a powerful feature that allows you to display and position official macOS menu bar extras (the icons on the right side of the system menu bar) directly within SketchyBar.

This is useful for integrating system items like the Control Center, Wi-Fi status, or third-party app menu bar icons into your custom bar.

Important: Permissions

To be able to find and render menu bar extras, SketchyBar requires Screen Recording permissions. When you first add an alias item, macOS will prompt you to grant these permissions. You must grant them and then restart SketchyBar for aliases to work.

Finding Available Aliases

Before you can add an alias, you need to know its name. You can query for all available menu bar extras using the following command:

sketchybar --query default_menu_items

This will output a JSON list of all discoverable items in the format "Owner,Name". For example:

[
    "SystemUIServer,Bluetooth", 
    "SystemUIServer,Siri", 
    "SystemUIServer,ControlCenter"
]

Creation

You create an alias using the --add alias command.

# Syntax: sketchybar --add alias "<Owner>,<Name>" <position>

sketchybar --add alias "SystemUIServer,ControlCenter" right
  • The first argument is the full "Owner,Name" string obtained from the query.
  • The second argument is the position (left, center, or right).

Note: You must give the new alias a unique name using --set. The name from the query is only for identification.

Example

# Add the Control Center alias and give it the name 'control_center'
sketchybar --add alias "SystemUIServer,ControlCenter" right \
           --rename "SystemUIServer,ControlCenter" control_center

# Now you can configure its properties like any other item
sketchybar --set control_center padding_left=10 padding_right=5

Alias-Specific Properties

Aliases support a subset of standard item properties. Notably, you can override their color.

  • alias.color=<HEX_COLOR>: Overrides the original icon color. The entire alias will be rendered in this single color.
  • alias.color_override=off: To disable a previously set color override.
  • update_freq=<SECONDS>: How often SketchyBar should check for updates to the alias's appearance. This is important for icons that change state (e.g., Wi-Fi bars).

Example: Themed Wi-Fi Icon

sketchybar --add alias "SystemUIServer,WiFi" right \
           --rename "SystemUIServer,WiFi" wifi \
           --set wifi script="$PLUGIN_DIR/wifi.sh" \
                      update_freq=5

# You could then have a script change the color based on the network
# Or simply set a static theme color
sketchybar --set wifi alias.color=0xfff5c2e7