A library to create panels and other desktop components for Wayland using the Layer Shell protocol
C
386
614 commits
updated Aug 16, 2026
This project is complete and in maintenance mode. It will continue to receive fixes and updates to new GTK3 versions for the foreseeable future, but minimal development beyond that. New features will only be merged if they are critical for existing apps and don't threaten stability. New projects are recommended to use GTK4 instead.

A library to write GTK applications that use Layer Shell. Layer Shell is a Wayland protocol for desktop shell components, such as panels, notifications and wallpapers. You can use it to anchor your windows to a corner or edge of the output, or stretch them across the entire output. It supports all Layer Shell features including popups and popovers (GTK popups Just Work™). This Library is compatible with C, C++ and any language that supports GObject introspection files (Python, Vala, etc, see using the library below).
AI agents are very useful, however I find their output annoying to read and frontier LLMs can not write code for this project that is consistently correct. Therefore:
This library only works on Wayland, and only on Wayland compositors that support the Layer Shell protocol. Layer shell is supported on:
--add-wayland-extension zwlr_layer_shell_v1)Layer shell is not supported on:
gtk-layer-demo is built if examples are enabled. Its UI exposes all features of the library, and it's useful for testing layer shell support in compositors. Its code can be found in examples/demo/.
The easiest way to build against GTK Layer Shell is to use the gtk-layer-shell-0 pkg-config package. Refer to your build system or the pkg-config docs for further instructions. examples/simple-example.c is a minimal complete app written in C.
examples/simple-example.py contains sample Python code.
examples/vala-standalone contains a minimal working standalone Vala project, see the readme for details.
@pentamassiv maintains safe Rust bindings and the crates.io crate. Rust examples can be found here.
mswiger maintains Ruby bindings which are published to RubyGems.
$ meson setup -Dexamples=true -Ddocs=true -Dtests=true build$ ninja -C build$ sudo ninja -C build install$ sudo ldconfigTo install these dependencies on Ubuntu 18.04 and later:
sudo apt install meson libwayland-dev libgtk-3-dev gobject-introspection libgirepository1.0-dev gtk-doc-tools valac
-Dexamples (default false): If to build the example C apps; gtk-layer-demo is installed if examples are built; The Vala example is never built with the rest of the project-Ddocs (default false): If to generate the docs-Dtests (default false): If to build the tests-Dintrospection (default: true): If to build GObject Introspection data (used for bindings to languages other than C/C++)-Dvapi (default: true): If to build VAPI data (allows this library to be used in Vala). Requires -Dintrospection=trueninja -C build testmeson test <testname> --verbose -C buildGTKLS_VALGRIND=1GTK Layer Shell is licensed under the GNU Lesser General Public License version 3.0 or any later version.
Most of the individual source files are licensed under MIT.
To prevent possible future confusion, all contributions must contain the following in the PR message: By opening this pull request, I agree for my modifications to be licensed under whatever licenses are indicated at the start of the files I modified
I want everyone to be able to use GTK Layer Shell however they desire, but parts of it are extracted from GTK. Therefore, the project as a whole is licensed under GNU Lesser General Public License (LGPL) version 3 or any later version (a newer version of the same license as GTK). See LICENSE_LGPL.txt and LICENSE_GPL.txt for details. Almost all of the non-generated code, however, is licensed under MIT (LICENSE_MIT.txt). At the top of each file should be a header that specifies which license applies to it. Please refer to that if in doubt.
This library can be linked against under similar terms as GTK itself, so licensing shouldn't be a problem for most potential users. Furthermore, most of the code within this library can be used in permissively licensed or proprietary projects.
C
92.2%
Python
6.9%
A library to create panels and other desktop components for Wayland using the Layer Shell protocol
C
386
614 commits
updated Aug 16, 2026
This project is complete and in maintenance mode. It will continue to receive fixes and updates to new GTK3 versions for the foreseeable future, but minimal development beyond that. New features will only be merged if they are critical for existing apps and don't threaten stability. New projects are recommended to use GTK4 instead.

A library to write GTK applications that use Layer Shell. Layer Shell is a Wayland protocol for desktop shell components, such as panels, notifications and wallpapers. You can use it to anchor your windows to a corner or edge of the output, or stretch them across the entire output. It supports all Layer Shell features including popups and popovers (GTK popups Just Work™). This Library is compatible with C, C++ and any language that supports GObject introspection files (Python, Vala, etc, see using the library below).
AI agents are very useful, however I find their output annoying to read and frontier LLMs can not write code for this project that is consistently correct. Therefore:
This library only works on Wayland, and only on Wayland compositors that support the Layer Shell protocol. Layer shell is supported on:
--add-wayland-extension zwlr_layer_shell_v1)Layer shell is not supported on:
gtk-layer-demo is built if examples are enabled. Its UI exposes all features of the library, and it's useful for testing layer shell support in compositors. Its code can be found in examples/demo/.
The easiest way to build against GTK Layer Shell is to use the gtk-layer-shell-0 pkg-config package. Refer to your build system or the pkg-config docs for further instructions. examples/simple-example.c is a minimal complete app written in C.
examples/simple-example.py contains sample Python code.
examples/vala-standalone contains a minimal working standalone Vala project, see the readme for details.
@pentamassiv maintains safe Rust bindings and the crates.io crate. Rust examples can be found here.
mswiger maintains Ruby bindings which are published to RubyGems.
$ meson setup -Dexamples=true -Ddocs=true -Dtests=true build$ ninja -C build$ sudo ninja -C build install$ sudo ldconfigTo install these dependencies on Ubuntu 18.04 and later:
sudo apt install meson libwayland-dev libgtk-3-dev gobject-introspection libgirepository1.0-dev gtk-doc-tools valac
-Dexamples (default false): If to build the example C apps; gtk-layer-demo is installed if examples are built; The Vala example is never built with the rest of the project-Ddocs (default false): If to generate the docs-Dtests (default false): If to build the tests-Dintrospection (default: true): If to build GObject Introspection data (used for bindings to languages other than C/C++)-Dvapi (default: true): If to build VAPI data (allows this library to be used in Vala). Requires -Dintrospection=trueninja -C build testmeson test <testname> --verbose -C buildGTKLS_VALGRIND=1GTK Layer Shell is licensed under the GNU Lesser General Public License version 3.0 or any later version.
Most of the individual source files are licensed under MIT.
To prevent possible future confusion, all contributions must contain the following in the PR message: By opening this pull request, I agree for my modifications to be licensed under whatever licenses are indicated at the start of the files I modified
I want everyone to be able to use GTK Layer Shell however they desire, but parts of it are extracted from GTK. Therefore, the project as a whole is licensed under GNU Lesser General Public License (LGPL) version 3 or any later version (a newer version of the same license as GTK). See LICENSE_LGPL.txt and LICENSE_GPL.txt for details. Almost all of the non-generated code, however, is licensed under MIT (LICENSE_MIT.txt). At the top of each file should be a header that specifies which license applies to it. Please refer to that if in doubt.
This library can be linked against under similar terms as GTK itself, so licensing shouldn't be a problem for most potential users. Furthermore, most of the code within this library can be used in permissively licensed or proprietary projects.
C
92.2%
Python
6.9%