ConfigurationFiles - robmcmullen/peppy GitHub Wiki

Table of Contents

Peppy Configuration

Configuration Directory

Peppy maintains a configuration directory on a per-user basis. Where it is located depends on which platform you are using: (if you're familiar with wxWindows, it's the directory that's returned from the wx.StandardPaths.GetUserDataDir() method)

  • unix/linux: $HOME/.peppy
  • windows: C:/Documents and Settings/username/Application Data/Peppy
  • mac: ~/Library/Application Support/Peppy
There are a variety of files in that directory, used to store various bits of data for persistence between runs of peppy. The user configuration file is preferences.cfg

preferences.cfg

The main application preferences file is preferences.cfg, a Windows INI style file.

Keyboard Configuration

Peppy comes configured for with several different keybinding templates that imitate the working environment of Windows, OSX, or emacs. You can specify these with the --key-binding [win|mac|emacs] argument on the command line, or in the preferences.

In the preferences.cfg file, the section KeyboardConf controls user overrides to the default keybindings.

An example of the section might be:

[KeyboardConf]
key_bindings = "emacs"
NextWord = C-N
PreviousWord = C-P
Paste = C-V

Breaking it down by parts:

[KeyboardConf]
This is the section header that denotes a keyboard configuration block
key_bindings = "emacs"
The key_bindings variable controls the default keyboard configuration. If this variable is not present, the default configuration is automatically determined based on the platform. To set this variable, it should use one of the following values: "emacs", "win", or "mac".
NextWord = C-N
The remaining entries in the section are keybindings. The format of each line is ActionName = keybinding, where ActionName is the class name of the action you wish to rebind. Currently, the easiest way to discover these name is to run peppy with the --show-key-bindings argument, which will display all of the current keybindings to the console in a format usable for the KeyboardConf section of the preferences. You can also use the menu item Help -> Show Key Bindings, or when all else fails you can look at the source code. (A GUI to change the keybindings is ticket #53 on the roadmap. Feel free to add suggestions there.) To set the keybinding to a particular keystroke, check the KeyboardProcessing wiki entry for the description of how to specify keystrokes.
⚠️ **GitHub.com Fallback** ⚠️