gitmyhub

layer_shell.dart

Dart ★ 1 updated 6d ago

A library to create panels and other desktop components for Wayland using the Layer Shell protocol - powered by Flutter!

A Flutter library for building Wayland desktop panels, docks, and wallpapers on Linux using the Layer Shell protocol.

DartFlutterGTKWaylandsetup: hardcomplexity 4/5

This project is a library for building desktop panels, docks, wallpapers, and notification popups on Linux computers running Wayland, a system that manages what appears on screen. It is built with Flutter, the app framework normally used for mobile and web apps, and connects it to a lower level Linux tool called gtk-layer-shell so that Flutter windows can be pinned to the edges of the screen, reserve space so other windows do not overlap them, and sit above or below regular application windows the way a taskbar or wallpaper would.

The README is upfront that this is experimental. It depends on windowing features inside Flutter that are private and can change at any time, even in small updates. Because of that, it cannot be published through Flutter's normal package system, so anyone using it has to pull it directly from its source code location instead. It also requires using Flutter's less stable main release channel rather than the regular stable one.

To use it, a computer needs some system libraries installed first, plus a Wayland environment that actually supports the layer shell feature, since not all Wayland setups do. Developers add the library to their Flutter project, link the system library into the Linux build files, and then create a window controller inside their app describing which screen edge to attach to, how much space to reserve, and which layer to sit on. The library also offers helper functions for listing connected monitors and getting screen size. A small working example project is included so developers can see a single panel running before building something more complex.

The project is released under the GPLv3 license, meaning any project that uses it and is distributed to others must also make its own source code available under compatible terms.

Where it fits