No description
Find a file
2025-10-18 01:04:55 +02:00
.github/workflows Fix GitHub Pages upload 2025-10-18 01:04:55 +02:00
book Automatically export widgets 2024-06-25 00:13:10 +02:00
docs Update widget docs 2024-12-27 20:38:32 +01:00
examples Add toast overlay (#122) 2024-06-16 19:29:12 +02:00
owlkettle Fix fields and fieldPairs loops in guidsl (#185) 2025-10-18 00:54:34 +02:00
.gitignore Ignore all extensionless files (#161) 2024-04-11 11:33:16 +02:00
config.nims Add overshot and reached signals to ScrolledWindow 2024-04-11 00:32:27 +02:00
CONTRIBUTING.md Add Scale widget 2023-10-02 17:05:26 +02:00
LICENSE.txt Initial commit 2022-03-09 00:08:28 +01:00
nbook.nim Add gui_macro guide 2024-06-08 16:55:41 +02:00
nimib.toml Add imprint and license chapters 2023-03-15 13:25:13 +01:00
owlkettle.nim Free GError 2024-03-28 19:42:51 +01:00
owlkettle.nimble Add toolbar view (#127) 2024-06-11 21:36:15 +02:00
README.md Update version in docs 2024-03-06 15:42:37 +01:00

Owlkettle

Freshly brewed user interfaces.

Owlkettle is a declarative user interface framework based on GTK. It is written in Nim.

Here is an example for a simple counter app. When you click on the "+" Button, the counter increments.

import owlkettle

viewable App:
  counter: int

method view(app: AppState): Widget =
  result = gui:
    Window:
      title = "Counter"
      defaultSize = (200, 60)

      Box(orient = OrientX, margin = 12, spacing = 6):
        Label(text = $app.counter)
        Button {.expand: false.}:
          text = "+"
          style = [ButtonSuggested]
          proc clicked() =
            app.counter += 1

brew(gui(App()))

The code above will result in the following application:

Counter Application

Owlkettle also supports building libadwaita apps. To enable libadwaita, import owlkettle/adw and change the last line to adw.brew(gui(App())).

Counter Application using Adwaita Stylesheet

Installation

Owlkettle requires GTK 4 to be installed on your system. You can install it by running:

  • dnf install gtk4-devel libadwaita-devel on Fedora
  • apt install libgtk-4-dev libadwaita-1-dev on Ubuntu
  • pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita on Windows' MSYS2
$ nimble install owlkettle

Check out the installation guide for further instructions.

Documentation

You can find a reference of all widgets in docs/widgets.md.

A tutorial for building a simple Todo application can be found here.

Additional examples can be found here.

A reference of all supported libadwaita widgets can be found in docs/widgets_adwaita.md.

License

Owlkettle is licensed under the MIT license. See LICENSE.txt for more information.