Skip to content

Configuration

It is possible to configure fx by setting environment variables.

FX_SHOW_SIZE

Fx can show the number of elements in arrays and objects.

bash
export FX_SHOW_SIZE=true

Press s s to show/hide sizes.

FX_LINE_NUMBERS

Fx can show line numbers.

bash
export FX_LINE_NUMBERS=true

Press s l to show/hide line numbers.

FX_NO_MOUSE

By default, mouse events are redirected to stdin. To disable this behavior, set the FX_NO_MOUSE environment variable.

bash
export FX_NO_MOUSE=true

TIP

It is possible to select text in fx, even with the mouse enabled, by holding one of the following keys:

KeyTerminal
fnTerminal.app
optioniTerm2, Hyper
shiftLinux

FX_COLLAPSED

Fx can be configured to start with collapsed nodes by default.

bash
export FX_COLLAPSED=true

FX_INDENT

Fx allows you to customize the indentation. The value can be either a number (like 2 or 4) or a string.

FX_THEME

Fx can be customized with a theme.

bash
export FX_THEME=5

To preview available themes, run:

bash
fx --themes

Add your own theme in theme.go and create a pull request.