Limekit

Version:

2.0

Contact:

omegamsiskah@gmail.com

Author:

Omega Msiska

Let’s get you started!

Limekit is a framework (wrapper for PySide6) for building desktop applications using the lua language without the need for HTML and CSS. The framework allows developers to maintain a single lua codebase and create cross-platform apps that work on Windows, macOS, and Linux.

Note

The framework is created in Python, but there’s no need for you to learn Python at all.

Important

This documentation covers Limekit 2.0, which introduces a module system, a uniform error guard, and consistent 1-based indexing.

If you have an app written for Limekit 1.x: the 1.x engine has been retired, so Limer recognises such a project and tells you rather than running it. To move it across, see Migrating from 1.x.

Your first app, in full:

 1local ui = require("limekit.ui")
 2
 3local window = ui.Window { title = "Hello, Limekit", size = { 320, 160 } }
 4
 5local button = ui.Button("Click me")
 6button:setOnClick(function()
 7    button:setText("Clicked!")
 8end)
 9
10local layout = ui.VLayout()
11layout:addChild(button)
12
13window:setLayout(layout)
14window:show()

What is new in 2.0

  • Modules instead of globals. Nothing is injected into the global namespace. You ask for what you need with require("limekit.ui"), and your editor can autocomplete every class because the framework ships Lua Language Server stubs.

  • Errors no longer kill your app. Every handler you attach crosses a guard. A mistake in one button’s callback is reported with the widget and event name attached, and the rest of the app carries on running.

  • Everything counts from 1. Rows, columns, tabs, and list items are all 1-based, matching Lua itself. In 1.x some widgets counted from 0 and others from 1.

  • Setters chain. Every setter returns the widget, so label:setText("Hi"):setWordWrap(true) works.

  • Friendlier values. Where 1.x wanted a constant, 2.0 takes a plain string: slider:setOrientation("vertical"). Pass an unknown one and you get an error naming the valid options instead of silence.

Where to go next

  • Part 1: Setup: Guides you step-by-step to set up Python on your computer, which is crucial as the framework depends on the Python language.

  • Part 2: Core concepts: The handful of rules that apply everywhere – modules, chaining, indexing, and what happens when your code raises an error. Read this one before the reference pages.

  • Part 3: Widgets: Focuses on interactivity. Think buttons, combo boxes, menus, check boxes, radio buttons and many more - they’re all in the mix!

  • Part 4: Widget Items: Covers how to interact with some special widgets such as the Tab, ToolBar, etc.

  • Part 5: Layout Managers: Covers the different layouts available in the framework

  • Part 6: Services: The filesystem, the running machine, dialogs, themes, and your project’s own images and scripts.

  • Part 7: Charts: Line, bar and area charts, with axes and legends.

  • Part 8: Batteries included: Covers all the other features provided by the framework, such as the sqlite3 database, using the system tray, displaying system notifications, threads, signals, and timers.

  • Part 9: Migrating from 1.x: A table of every rename, every corrected method, and the handful of behaviours that deliberately changed.

Showcase

_images/one.png _images/two.png _images/1.png _images/2.png _images/5.png _images/3.png _images/4.png _images/6.png _images/8.png _images/9.png _images/12.png _images/13.png

Getting help

Having trouble?

Head over to our discord server Try asking in our r/limekit reddit community

Or contact me on omegamsiskah@gmail.com

Support the project

Buy me a coffee to support the project. This will help me stay awake at night 😁

visit buymeacoffee.com/omegamsiska

_images/bmc_qr.png