Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.sketchybar.enable

Whether to enable sketchybar.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.sketchybar.package

The sketchybar package to use.

Type: package

Default:

pkgs.sketchybar

Declared by:

programs.sketchybar.config

The sketchybar configuration. Can be specified as:

  1. A string containing the configuration content directly
  2. An attribute set with ‘source’ pointing to a directory containing the full configuration, and optionally ‘recursive = true’ to recursively copy all files
  3. An attribute set with ‘text’ containing inline configuration

When using a string or ‘text’, the appropriate shebang will be automatically added based on configType (bash or lua).

When using a directory source, it should contain a file named “sketchybarrc” which serves as the main entry point.

Type: null or strings concatenated with “\n” or (submodule)

Default:

null

Example:

# String example - inline configuration
''
# Define colors
export COLOR_BLACK="0xff181926"
export COLOR_WHITE="0xffcad3f5"

# Configure bar
sketchybar --bar height=32 \
                position=top \
                padding_left=10 \
                padding_right=10 \
                color=$COLOR_BLACK

# Configure default values
sketchybar --default icon.font="SF Pro:Bold:14.0" \
                    icon.color=$COLOR_WHITE \
                    label.font="SF Pro:Bold:14.0" \
                    label.color=$COLOR_WHITE

# Add items to the bar
sketchybar --add item clock right \
          --set clock script="date '+%H:%M'" \
                      update_freq=10

# Update the bar
sketchybar --update
''

# Or directory example - for complex configurations
# {
#   source = ./path/to/sketchybar-config;
#   recursive = true;
# }

Declared by:

programs.sketchybar.config.recursive

Whether to enable Whether to recursively link files from source (if it is a directory) in .config/sketchybar. .

Type: boolean

Default:

false

Example:

true

programs.sketchybar.config.source

The path to be linked to .config/sketchybar if source is a directory, or to .config/sketchybar/sketchybarrc if it is a file.

Type: null or absolute path

Default:

null

programs.sketchybar.config.text

Text to be included in .config/sketchybar/sketchybarrc.

Type: strings concatenated with “\n”

Default:

""

programs.sketchybar.configType

The type of configuration to generate.

Set to “bash” to use the standard bash configuration. Set to “lua” to use the Lua configuration via SbarLua.

Type: one of “bash”, “lua”

Default:

"bash"

Declared by:

programs.sketchybar.extraLuaPackages

The extra Lua packages required for your plugins to work. This option accepts a function that takes a Lua package set as an argument, and selects the required Lua packages from this package set. See the example for more info.

Type: function that evaluates to a(n) list of package

Default:

ps: [ ]

Example:

luaPkgs: with luaPkgs; [ luautf8 ]

Declared by:

programs.sketchybar.extraPackages

Extra packages to add to PATH for the sketchybar service.

Type: list of package

Default:

[ ]

Example:

[ pkgs.jq ]

Declared by:

programs.sketchybar.includeSystemPath

Whether to include common system PATH in the wrapper. This allows sketchybar to access system binaries.

Type: boolean

Default:

true

Declared by:

programs.sketchybar.luaPackage

Lua interpreter to use when configType is lua.

By default this is inferred from sbarLuaPackage.passthru.luaModule when available.

Type: null or package

Default:

null

Example:

pkgs.lua5_5

Declared by:

programs.sketchybar.sbarLuaPackage

The sbarlua package to use. Required when using a lua configuration.

Type: null or package

Default:

pkgs.sbarlua

Declared by:

programs.sketchybar.service.enable

Whether to enable sketchybar service.

Type: boolean

Default:

true

Example:

true

Declared by:

programs.sketchybar.service.errorLogFile

Absolute path to log all stderr output.

Type: null or absolute path or string

Default:

${config.home.homeDirectory}/Library/Logs/sketchybar/sketchybar.err.log

Example:

"/Users/khaneliman/Library/Logs/sketchybar.log"

Declared by:

programs.sketchybar.service.outLogFile

Absolute path to log all stdout output.

Type: null or absolute path or string

Default:

${config.home.homeDirectory}/Library/Logs/sketchybar/sketchybar.out.log

Example:

"/Users/khaneliman/Library/Logs/sketchybar.log"

Declared by: