Environment¶
Use [app.env] for environment variables that should be visible inside the Lua runtime and any shell commands launched by widgets.
Example¶
[app]
widgets_dir = "~/.config/easybar/widgets"
lua_path = "/opt/homebrew/bin/lua"
lua_socket_path = "/tmp/EasyBar/lua-runtime.sock"
[app.env]
PATH = "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"
TAILSCALE = "/usr/local/bin/tailscale"
PATH behavior¶
EasyBar resolves PATH in this order:
- If
[app.env]setsPATH, EasyBar passes that exact value to the Lua runtime. - If
[app.env]does not setPATH, EasyBar uses the inherited appPATHwhen available. - If the app itself has no usable
PATH, EasyBar falls back to:
/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
Why this matters¶
GUI-launched macOS apps do not normally inherit your shell startup files such as .zshrc.
Set [app.env] when Lua widgets need tools such as:
brewtailscalekubectl- custom scripts
- package-manager commands