The way that Complexitty works can be configured using a configuration file.
This section will describe what can be configured and how.
The location of the configuration file will depend on how your operating
system and its settings; but by default it is looked for in
$XDG_CONFIG_HOME,
in a complexitty subdirectory. Mostly this will translate to the file being
called ~/.config/complexitty/configuration.json.
Keyboard bindings
Complexitty allows for a degree of configuration of its keyboard bindings;
providing a method for setting up replacement bindings for the commands that
appear in the command palette.
Bindable commands
The following commands can have their keyboard bindings set:
ChangeTheme - Change the application's theme
Default:f9
CopyCommandLineToClipboard - Copy the command line for the current view to the clipboard
Default:c
DecreaseMaximumIteration - Decrease the maximum iterations for the calculations by 10
Default:comma
DecreaseMultibrot - Decrease the 'multibrot' value
Default:/
GoMiddle - Centre the display on the 'middle' of the Mandelbrot set
Default:home
GoTo - Prompt for a location and go to it
Default:g
GreatlyDecreaseMaximumIteration - Decrease the maximum iterations for the calculations by 100
Default:<
GreatlyIncreaseMaximumIteration - Increase the maximum iterations for the calculations by 100
Default:>
Help - Show help for and information about the application
Default:f1, ?
IncreaseMaximumIteration - Increase the maximum iterations for the calculations by 10
Default:.
IncreaseMultibrot - Increase the 'multibrot' value
Default:*
MoveDown - Move down
Default:down, s, j
MoveDownSlowly - Move down slowly
Default:shift+down, S, J
MoveLeft - Move left
Default:left, a, h
MoveLeftSlowly - Move left slowly
Default:shift+left, A, H
MoveRight - Move right
Default:right, d, l
MoveRightSlowly - Move right slowly
Default:shift+right, D, L
MoveUp - Move up
Default:up, w, k
MoveUpSlowly - Move up slowly
Default:shift+up, W, K
Quit - Quit the application
Default:f10, escape
Reset - Reset the plot to the default values
Default:r
SetColourToBluesAndBrowns - Set the colours to combination of blues and browns
Default:2
SetColourToBluesAndPinks - Set the colours to a blue/pink palette
Default:6
SetColourToDefault - Set the colours to the default palette
Default:1
SetColourToRainbow - Set the colours to a rainbow palette
Default:7
SetColourToShadesOfBlue - Set the colours to various shades of blue
Default:5
SetColourToShadesOfGreen - Set the colours to various shades of green
Default:4
SetColourToShadesOfRed - Set the colours to various shades of red
Default:3
Undo - Undo the latest change
Default:backspace
ZeroZero - Centre the display on 0,0
Default:end
ZoomIn - Zoom in
Default:pageup, right_square_bracket
ZoomInFaster - Zoom in twice as much
Default:ctrl+pageup, right_curly_bracket
ZoomOut - Zoom out
Default:pagedown, left_square_bracket
ZoomOutFaster - Zoom out twice as much
Default:ctrl+pagedown, left_curly_bracket
Changing a binding
If you wish to change the binding for a command, edit the configuration file
and add the binding to the bindings value. For example, if you wanted to
change the binding used to reset the whole plot, changing it from
r to f5, and you also wanted to use m to go
to the middle of the plot, you would set bindings to this:
"bindings":{"Reset":"f5","GoMiddle":"m"}
The designations used for keys is based on the internal system used by
Textual; as such its caveats about what
works where
apply.
The main modifier keys to know are shift, ctrl, alt, meta, super
and hyper; letter keys are their own letters; shifted letter keys are
their upper-case versions; function keys are simply f1,
f2, etc; symbol keys (the likes of #, @, *, etc...)
generally use a name (number_sign, at, asterisk, etc...).
Tip
If you want to test and discover all of the key names and combinations
that will work, you may want to install
textual-dev and use the
textual keys command.
Complexitty has a number of themes available. You can select a theme using the
Change Theme (ChangeTheme, bound to F9
by default) command. The available themes include:
catppuccin-latte
catppuccin-mocha
dracula
flexoki
gruvbox
monokai
nord
solarized-light
textual-dark
textual-light
tokyo-night
Tip
You can also set the theme via the command line. This can
be useful if you want to ensure that Complexitty runs up with a specific theme.
Note that this also configures the theme for future runs of Complexitty.
Here's a sample of some of the themes:
As you will note from above; changing the application theme doesn't change
the colours used for Mandelbrot set plot -- but there are commands for
changing them.