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
(links)
 
(2 intermediate revisions by the same user not shown)
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">
<pre class="p8sh">
> config
> config
config [setting]
config [setting]
Line 27: Line 27:
splore_filter
splore_filter
tab_width
tab_width
</syntaxhighlight>
</pre>
Examining and modifying the tab width setting:
Examining and modifying the tab width setting:
<syntaxhighlight lang="io">
<pre class="p8sh">
> config tab_width
> config tab_width
config tab_width [width]
config tab_width [width]
Line 36: Line 36:
> config tab_width 2
> config tab_width 2
set tab_width: 2
set tab_width: 2
</syntaxhighlight>
</pre>


== See also ==
== See also ==


* [[Keyconfig|<code>keyconfig</code>]]
* <code>[[keyconfig]]</code>
* [[Configuration]]
* [[Configuration]]
[[Category:Reference]]
[[Category:Reference]]
[[Category:Command]]
[[Category:Command]]

Latest revision as of 14:26, 13 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