Config: Difference between revisions

From Pico-8 Wiki
Jump to navigation Jump to search
imported>Felice Enellen
(→‎Examples: using the example as a convenient place to list the current settings)
imported>Felice Enellen
(shell colors)
Line 16: Line 16:
== Examples ==
== Examples ==
At the Pico-8 prompt, discovering available settings:
At the Pico-8 prompt, discovering available settings:
<syntaxhighlight lang="io">
<syntaxhighlight class="p8sh">
> config
> config
config [setting]
config [setting]
Line 29: Line 29:
</syntaxhighlight>
</syntaxhighlight>
Examining and modifying the tab width setting:
Examining and modifying the tab width setting:
<syntaxhighlight lang="io">
<syntaxhighlight class="p8sh">
> config tab_width
> config tab_width
config tab_width [width]
config tab_width [width]

Revision as of 20:45, 11 March 2021

config [setting] [value]
Modify the configuration settings.
setting
The name of the setting, e.g. theme. If absent, available settings are listed.

value
The new value for the setting. If absent, the current value is printed.

This is a way to modify the PICO-8 configuration live at runtime, within the PICO-8 environment. Changes will be saved to PICO-8's configuration file.

Run the command with no arguments to see the names of the available settings.

Run the command with the name of a setting to see its current value and info on how to change the value.

Run the command with both the name of a setting and a new value to change the setting.

Examples

At the Pico-8 prompt, discovering available settings:

> config
config [setting]

available settings:
volume
theme
gif_len
screenshot_scale
splore_filter
tab_width

Examining and modifying the tab width setting:

> config tab_width
config tab_width [width]
current tab_width: 1

> config tab_width 2
set tab_width: 2

See also