8.6 Environment variables8 Advanced topics8.4 Unicode text8.5 Customizing Ipe

8.5 Customizing Ipe

Since most of Ipe is writing in Lua, an interpreted language, much of Ipe's behavior can be changed without recompilation.

The main customization options are in the files prefs.lua (general settings), shortcuts.lua (keyboard shortcuts), and mouse.lua (mouse shortcuts). (Check the Lua code path in Show configuration in the Help menu if you can't locate the files.)

If you have installed Ipe for your personal use only (for instance under Windows), you can simply modify the original Lua file. In all other cases, you need to provide a small Lua ipelet that will change the setting you wish to change.

A small example is the following ipelet that changes a keyboard shortcut and the maximum zoom:

----------------------------------------------------------------------
-- My customization ipelet: customize.lua
----------------------------------------------------------------------
prefs.max_zoom = 100
shortcuts.insert_text_box = "I",
shortcuts.mode_splines = "Alt+Ctrl+I"

The ipelet needs to be placed with the extension .lua somewhere on the ipelet path (check Show configuration again). On Unix, the directory $HOME/.ipe/ipelets will do nicely. On Windows, you will have to set the environment variable IPELETPATH, see the next section.