No description
Find a file
2025-12-02 15:34:26 +05:30
example downgrade: 0.1.0 2025-11-26 20:02:03 +05:30
src fix: remove garbage 2025-12-02 15:34:26 +05:30
.gitignore (feat) initial commit 2024-12-18 19:58:00 +05:30
louvre.nimble fix: remove garbage 2025-12-02 15:34:26 +05:30
neo.toml fix: remove garbage 2025-12-02 15:34:26 +05:30
nim.cfg (add) more stuff 2024-12-19 21:42:35 +05:30
README.md add: implement LContentType 2025-04-28 16:02:54 +05:30
shell.nix (add) more stuff 2024-12-19 21:42:35 +05:30

nim-louvre

This package provides bindings for Louvre, a library for writing Wayland compositors.

Currently, this is the only way to write a Wayland compositor with Nim. Louvre is powerful when needed, but it does a lot of hand-holding otherwise. You can get a compositor running in just a few lines of code.

minimal example

The following code starts a compositor that works.

import pkg/cppstl/std_smartptrs,
       pkg/louvre

proc main() =
  putEnv("LOUVRE_WAYLAND_DISPLAY", "louvre-display")

  var compositor = makeUnique(Compositor)
  echo "using Louvre " & $compositor.getVersion()

  if not compositor.start():
    echo "the compositor couldn't init :("
    quit(1)

  while compositor.getState() != CompositorState.Uninitialized:
    compositor.processLoop(-1)

  echo "bye bye!"

when isMainModule:
  main()

Now, you can just compile this program and run any program by setting the WAYLAND_DISPLAY environment variable to louvre-display to force it to connect to your test compositor.