Skip to content

Preferences

Ben Fry edited this page Jan 19, 2023 · 6 revisions

Customizing the PDE

A (very) partial list of some of the things that can be configured in the preferences.txt file.

What's included, what's not – Not all preferences are available in the “Preferences” window from the software. We try to make a decision about which items to include based on maximum utility for the highest number of people, and leave out extra options that are less necessary for day-to-day use. More options just makes things more confusing for users, so for each option, we have to ask ourselves whether adding the option to the Preferences window is helpful enough that it is worth the additional clutter or making the window more overwhelming.

Where is preferences.txt? – The location for preferences.txt varies by platform, so it's shown at the bottom of the Preferences window. Clicking the link will open the folder where it's located. Do not edit the file while Processing is running, because your changes will be overwritten.

The full list – You can find the full list of options, along with limited documentation in the defaults.txt file in the software download. View it in this repository here. Do not edit this file directly! It's a great way to break your Processing installation.

Completion Window

To automatically show completions (without hitting ctrl-space), set:

pdex.completion.trigger = false

This is not turned on by default because it can be overwhelming for new users to be presented with a lot of options they don't understand, simply as they're typing their first code.

Sketch Tabs and Underscores

In Processing 4.0, underscores are not shown by default in tab names. This makes the tabs look a little cleaner, especially for the default sketch naming scheme (sketch_YYMMDD with the year, month, and day).

If you miss the underscores, you can bring them back with:

sketch.name.replace_underscore = false

Sketchbook and Settings Location

The sketchbook folder location can always be changed from the Preferences window, which is enough for most users. The default location for the user's “sketchbook” is a subfolder of the “Documents” folder in their home directory.

To use a different default location, you can modify the Processing download by adding sketchbook.path.four to defaults.txt before distributing the application itself. This can be used for school computer labs or other places that it might be necessary to override the location without user involvement.

The default location for preferences.txt is unique to each operating system. The location is listed at the bottom of the Preferences window, but is generally:

  • Users → [username] → AppData → Roaming → Processing → preferences.txt (on Windows)

  • ~/Library/Processing/preferences.txt (on macOS)

  • ~/.config/processing/preferences.txt (on Linux)

To change the default location of the preferences.txt file (as well as the rest of that Processing folder that contains other required settings and information), create a file inside the lib folder of the Processing download called settings.txt. In that file, add a line that reads settings.path=/your/settings/location (replacing /your/settings/location with the place you'd like the settings folder to live).

On macOS, to find the lib folder you'll need to right-click Processing.app, select “Show Package Contents” and navigate to Contents → Java → lib.

Changing the settings path and the default sketchbook location will even give you a completely portable version of Processing that can be run from a USB stick.

Tabs and Spaces

People are finicky about tabs and spaces; we are too. We have some defaults used in the software (no tabs, 2 spaces for indents), but they can be changed.

  • editor.tabs.size = 2 – Tabs are represented with two spaces by default. Change this to 4 or 8 if you like.
  • editor.tabs.expand = true – Tabs are replaced with spaces by default. You can shut this off, but it is not recommended, and isn't really supported.

Proxies

This section needs to be written. There are a few notes defaults.txt. However, there are also a few open issues regarding proxy support such as 645 and 438. Please help!

If your proxy requires a username/password, that's not currently supported. There's an open issue about that too.

Again, we need help from people who are working in proxied environments to help us implement and test these features. We don't have access to such an environment, but know that it's important for many schools and places that we'd like to support.