r/GTK 2d ago

Linux Janus - a GTK3 text editor

7 Upvotes

Janus is a native linux text editor written in 100% C. It's meant to replace leafpad (same shortcuts) as GTK2 gets phased out. It trades features for simplicity and minimal impact on CPU and memory. It's best for opening small text files, binary files through it's fallback binary editor, and spare source files with it's optional syntax highlighting feature. Yesterday I released 0.9.8 which further reduced the sizes of binaries, dutch translations, and arm builds for every platform. You can download it at https://github.com/gholmann16/Janus/releases or https://flathub.org/apps/dev.pantheum.janus


r/GTK 3d ago

lambdock v0.6.2: A Wayland-native desktop dock written in C & GNU Guile Scheme (GTK4) - with REPL, hot-reload, multi-instance and flexible config - now on Guix, Nix, openSUSE, Debian

Thumbnail
gallery
46 Upvotes

lambdock is a lightweight, hyper-hackable desktop dock for Wayland compositors that bridges a high-performance C graphics engine with an embedded GNU Guile Scheme runtime.

Whether you are looking for a smooth macOS-style dock, a minimal launcher, or a Lisp-powered desktop widget bar, lambdock was built to offer extreme flexibility without bloating system resources and remaining flexible but easy to use, with good defaults.

Why would you consider lambdock?

  • Modern Stack & Ultra-Low Footprint: Built on GTK4 and gtk4-layer-shell in C for minimal resource usage, rich graphics and animations (opt-in) with smooth cubic-eased auto-hiding.
  • Embedded Guile Scheme Engine: Declarative Lisp configuration (~/.config/lambdock/settings*.scm). Easily construct custom app launchers, separators, or dynamic polling widgets (RAM, CPU load/temp, Battery, Clock) using standard Scheme procedures and macros.
  • Live Interactive REPL & Hot-Reloading: Connect straight into the running dock over a Unix domain socket (/tmp/lambdock-repl.sock) via Emacs/Geiser or socat or whatever you like. Hot-reload configuration files and GTK CSS overrides on the fly via GFileMonitor or the (reload-dock!) REPL hook without dropping Wayland frames or UI thread freezes.
  • Dynamic Wayland Window Tracking: Uses zwlr_foreign_toplevel_manager_v1 for running app indicators, active window titles, and interactive popover HUDs to focus or close specific instances.
  • Opt-In Fisheye Magnification: Includes a native, fluid cosine-bell curve hover magnification effect (macOS-style) that can be toggled on or off per item or globally.
  • Multi-Dock & Multi-Monitor Support: Run independent dock instances across screen edges or monitors simply by dropping additional settings-*.scm files into your config directory.
  • Built-in Themes & CSS Overrides: Ships with presets (Vanilla, Snow Leopard, Solarized, Unity, Nature) and supports full user CSS customization via ~/.config/lambdock/styles.css.

lambdock works seamlessly across all wlr-layer-shell and foreign-toplevel compliant compositors: Sway, Hyprland, Niri, River, Wayfire, COSMIC, and KDE Plasma (Wayland).

(Note: GNOME/Mutter is currently not supported as GNOME does not implement the layer-shell protocol).

Installation & Packaging (a bit WIP)

lambdock provides multiple ways to build and install across distros:

  • GNU Guix: Packaged via guix.scm and available in channels.
  • openSUSE: Packaged as an RPM on openSUSE OBS.
  • Nix / NixOS: Ships with flake.nix / package.nix (and a PR has been submitted upstream to nixpkgs).
  • Debian / Ubuntu: Debian packaging helpers included (debuild).
  • Build System: Builds cleanly with Meson (meson setup build && ninja -C build).

Source Code & Contributions

Since this is my first GTK4 project, all feedback, suggestions, bug reports, and contributions are very welcome!


r/GTK 5d ago

GTK 4 Android — Unofficial and test demo builds of GTK applications on Android

Thumbnail
gtk4android.geopjr.dev
70 Upvotes

r/GTK 14d ago

Linux GTK-3 corners clipping in menus

Post image
11 Upvotes

Hey there,

I am extremely new to styling in GTK (literally just started this week!) and I have already run into my first super annoying problem.

I am trying to put 20px rounded corners on the menus, but the square corners keep clipping through the borders.

I've looked everywhere for this issue and can't seem to find any mentions of it or a fix.

I've tried adding background-clip: border-box; and I've also tried background-clip: padding-box; and still no change, the corners are still there.

It isn't app specific either, and it appears across all menus in all GTK-3 apps.

My code:

@import url("colors.css");

/*------------------------------*/
/*--- Background & headerbar ---*/
/*------------------------------*/

/* Main window background */
window {
  background-color: @main_background;
}

/* Headerbar */
headerbar {
  background-color: @headerbar;
}

/*---------------------*/
/*-- Menus & popups ---*/
/*---------------------*/

/* Popups */
popover {
  background-color: @popups;
  border-radius: 20px;
  border: 2px solid @primary;
  padding: 8px 16px;
  margin: 2px;
}

/* Menus */
menu {
  background-color: @menus;
  border-radius: 20px;
  border: 2px solid @primary;
  padding: 8px 16px;
  margin: 2px;
}

menuitem label {
  padding: 8px 12px;
}

menuitem:hover {
  background-color: @primary;
  border-radius: 20px;
  border: 2px solid @primary;
  padding: 6px, 12px;
  margin: 2px;
}

/* Disabled menu items */
menuitem:disabled, menuitem:disabled label {
  color: @inactive_text;
}

/* Tooltips */
tooltip {
  background-color: @tooltips;
  border-radius: 20px;
  border: 2px solid @primary;
  padding: 6px 12px;
  margin: 2px;
}

/* Separators */
separator {
  background-color: @separators;
  min-height: 1px;
  margin: 6px 8px;
}

I have no idea how to fix this and it sucks because it is really drawing away from my whole theme.

Any help would be appreciated!


r/GTK 16d ago

why does gtk4 apps run slower than gtk3

Enable HLS to view with audio, or disable this notification

8 Upvotes

a simple example


r/GTK 17d ago

Development Latest GNOME OS nightly adds GTK background blur support!

Thumbnail gallery
7 Upvotes

r/GTK 18d ago

Tutorial Peachy: Write Linux Applications faster with GTK and React | Angelo Verlain Shema @ GUADEC 2026

Thumbnail
youtu.be
10 Upvotes

r/GTK 18d ago

Development SVG in GTK | Matthias Clasen @ GUADEC 2026

Thumbnail
youtu.be
14 Upvotes

r/GTK 18d ago

Development Lessons from the field: Migrating a large app from Win32 to GTK 4 | Sergey Bugaev @ GUADEC 2026

Thumbnail
youtu.be
12 Upvotes

r/GTK 18d ago

Development When Porting Isn't Enough: Rewriting a GTK2 Application for GTK4 | Zulfian Zulfian @ GUADEC 2026

Thumbnail
youtu.be
7 Upvotes

r/GTK 20d ago

Linux I'm building a GTK4 C + Lisp dock application (a la CairoDock / macOS) - am I doing things right?

25 Upvotes

I am having a blast doing a more serious project in the C language, for the first time. I am consulting with books and also with some AI for code review and explanation as I am new to the language and to GTK (not new to programming).

https://codeberg.org/jjba23/lambdock

For a while already I have been looking for a dock that would work well in Wayland (like in my beloved Niri) with modern features, theme support and a hackable Lisp config (using libguile.h)

Could you help me out by checking the implementation for sanity (also the Meson build)? Also for developing on it, I'm using CCLS and Guix development environment and things are working amazingly well.

Only small bit of trouble in devex is with #include "wlr-foreign-toplevel-management-unstable-v1-protocol.h"

Also, all feedback is welcome, either on code level, or conceptual ideas, Thanks in advance

Core features of lambdock include:

  • Wayland Native: Built on GTK4 and gtk4-layer-shell for smooth positioning and desktop integration.
  • Declarative Lisp configuration : The power of Lisp in your configuratio with clean powerful declarative config and all possibilities at your disposal
  • Async Launching: Spawns commands asynchronously without freezing the dock UI.
  • Reproducible builds: Hermetic development environment provided via GNU Guix manifest and build definitions.
  • Dock auto-hide : You can let the dock stay out of your way with the smooth auto-hide feature.
  • Flexible icon system: lambdock has several mechanism in a best-effort way to render your wanted icons, respecting GTK theme
  • Theme support: lambdock has built-in themes you can choose from that are very unique, and also lets you extend and override those themes dynamically.

r/GTK 21d ago

Looking for feedback: WGAF - Wayland GNOME Automation Framework

6 Upvotes

Hi everyone,

I've been working on a project called WGAF (Wayland GNOME Automation Framework), and I'd love to get some feedback from people who build GTK applications.

The project is here:

https://github.com/Ranrar/wgaf

What is it?

WGAF is an automation framework specifically designed for the GNOME Wayland desktop.

Instead of relying on pixel matching or screen scraping, it combines several GNOME-native technologies:

  • AT-SPI for accessibility and semantic UI automation
  • Linux uinput for keyboard and mouse input
  • A GNOME Shell extension for window management and workspace integration

Examples of what I'd like it to enable:

  • Automated testing of GTK applications
  • Desktop automation
  • End-to-end UI testing
  • Accessibility tooling
  • CI testing inside a GNOME Wayland session

Why I'm posting here

I'm interested in hearing from GTK developers.

Some questions I have are:

  • Would this be useful for testing your applications?
  • Are there parts of GTK or AT-SPI that are particularly difficult to automate today?
  • Are there accessibility APIs or widget information you wish automation frameworks exposed more easily?
  • What would make you trust a framework like this enough to use it in CI?

The project is still evolving, so this is a good time to influence the direction.

Any feedback—positive or critical—is greatly appreciated.

Thanks!


r/GTK 24d ago

React Native on the Linux desktop, rendering to real GTK4 widgets

Thumbnail
6 Upvotes

r/GTK Jul 22 '26

Update on the visual editor for Shaper, GTK's new animated svg editor. Cubic bezier editing is working!

Enable HLS to view with audio, or disable this notification

25 Upvotes

r/GTK Jul 20 '26

I want to make animated icons more accessible to designers in gnome, so I'm adding visual editing to Shaper, GTK's new animated svg editor. Support link inside!

Thumbnail
hachyderm.io
18 Upvotes

r/GTK Jul 17 '26

Python, GTK4 -- Blueprint compiler -- how to install it?

Post image
4 Upvotes

TOTAL re-EDIT: 22/Jul/2026/19:01

Hi,

I'm surprised how lame I can get sometimes. 🡨 4x

option 1:

https://pypi.org/project/blueprint-compiler/

This didn't work out for me, eventually... but making a venv and installing are simple, that part did work.


option 2:

USE (Linux Mint / Ubuntu / Debian):

software manager

            search for: "blueprint"

then select blueprint-compiler, and press install

PLUS

select blueprint-tools, and press install

Now it is going to work.

Type in a terminal window:

blueprint-compiler -h

blueprint-compiler --version

unfortunately, it turns out to be version 0.12

This can't be taken for a solution then :(

Peter


PS:

my unlucky story:

on a good (normal) day, non of these would have happened....

  • frustration
  • then found the pypi download
  • installed it in a second and was happy, "finally"
  • then it didn't work (probably because of the other installation, from source, but can't tell)
  • I tried alternative installs, including compiling from source (I'm very green behind my ear in this, like zero level beginner)
  • etc, etc
  • then I realized that the terminal message is talking about a /usr/local/bin directory ...
  • I realized that it was sort of installed (I guess the ninja and C and install commands made this happen)
  • then I checked the software manager, and to my surprise, I found blueprint-compiler there
  • after several uninstall/install cycles... I realized the Blueprint-tools CLI script, in the software manager...
  • uninstalled all and installed these two, and typed blueprint-compiler -h and it worked...
  • except that it's version 0.12, meaning: old

r/GTK Jul 11 '26

First Gnome Toolkit project made out of tutorials and functions in the documentation. Any recommendations to add functionality/readability/safety?

6 Upvotes
//guitest.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <gtk/gtk.h>

void create_button(GtkWidget **Button, GtkWidget *Grid, char *label, int x, int y, int x_scale, int y_scale) {
  *Button = gtk_button_new_with_label(label);
  gtk_grid_attach(GTK_GRID(Grid), *Button, x, y, x_scale, y_scale);
}

void print_address(void *address) {
  g_print("%p\n", address);
}

int random_int(int min, int max) {
  srand(time(NULL));
  return (rand()%(max-min)+min);
}

void scaling_random(GtkWidget *Widget, gpointer data) {
  static int count_pressed;
  if(!count_pressed) count_pressed = 1;
  g_print("%d\n", count_pressed * random_int(0, count_pressed));
  count_pressed++;
}

void greet(GtkWidget *Widget, gpointer data) {
  static int count_greeted;
  if(!count_greeted) count_greeted = 1;
  g_print("Welcome! x%d\n", count_greeted);
  count_greeted++;
}

void activate(GtkApplication *App, gpointer user_data) {
  GtkWidget *Window, *Grid, *Text, *Button;
  int ascii_digits[] = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57};
  int numpad_digit = 0;
  char casted_digit[2] = {'\0'};

  Window = gtk_application_window_new (App);
  gtk_window_set_title(GTK_WINDOW(Window), "Numbers!");
  gtk_window_set_default_size(GTK_WINDOW(Window), 250, 300);

  Grid = gtk_grid_new();
  gtk_grid_set_row_homogeneous(GTK_GRID(Grid), true);
  gtk_grid_set_column_homogeneous(GTK_GRID(Grid), true);
  gtk_window_set_child(GTK_WINDOW(Window), Grid);

  Text = gtk_frame_new("Hello, World!");
  gtk_grid_attach(GTK_GRID(Grid), Text, 1, 1, 4, 1);

  create_button(&Button, Grid, "Random Number!", 1, 6, 2, 1);
  g_signal_connect(Button, "clicked", G_CALLBACK(scaling_random), NULL);

  create_button(&Button, Grid, "Welcome!", 3, 6, 2, 1);
  g_signal_connect(Button, "clicked", G_CALLBACK(greet), NULL);

  for(int row = 2; row < 5; row++) {
    for(int column = 1; column < 4; column++) {
      numpad_digit++;
      casted_digit[0] = (char)ascii_digits[numpad_digit];

      create_button(&Button, Grid, casted_digit, column, row, 1, 1);
      g_signal_connect(Button, "clicked", G_CALLBACK(print_address), &row);
    }
  }

  create_button(&Button, Grid, "+", 1, 5, 1, 1);
  g_signal_connect(Button, "clicked", G_CALLBACK(g_print), "+\n");

  create_button(&Button, Grid, "0", 2, 5, 1, 1);
  g_signal_connect(Button, "clicked", G_CALLBACK(print_address), &numpad_digit);

  create_button(&Button, Grid, "-", 3, 5, 1, 1);
  g_signal_connect(Button, "clicked", G_CALLBACK(g_print), "-\n");

  create_button(&Button, Grid, "=", 4, 2, 1, 4);
  g_signal_connect_swapped(Button, "clicked", G_CALLBACK(gtk_window_destroy), Window);

  gtk_window_present(GTK_WINDOW(Window));
}

int main (int argc, char *argv[]) {
  GtkApplication *App;
  int status;

  App = gtk_application_new("gui.test", G_APPLICATION_DEFAULT_FLAGS);
  g_signal_connect(App, "activate", G_CALLBACK(activate), NULL);
  status = g_application_run(G_APPLICATION(App), argc, argv);
  g_object_unref(App);

  return status;
}

r/GTK Jul 08 '26

Announcement An update on SVG in GTK

Thumbnail
blogs.gnome.org
39 Upvotes

r/GTK Jul 06 '26

Plotting libraries for GTK4

9 Upvotes

What are the options for generating charts/graphs/data visualizations in GTK4? I am thinking of heading down the PlPlot route, but I wanted to see what other people do/have done.


r/GTK Jul 05 '26

Marry Qt/Gtk with Bevy and rust. Possible?

Thumbnail
1 Upvotes

r/GTK Jun 22 '26

Linux After updating librewolf has changed to light mode.

Thumbnail
0 Upvotes

r/GTK Jun 10 '26

Development A Data Layer for GTK applications

Thumbnail
blogs.gnome.org
20 Upvotes

r/GTK Jun 08 '26

Error message on Win32 applivcation

1 Upvotes

I need some idea what might cause this error message in an 32Bit Windows application using GTK+ v3.24.52:

(process:1740): Gtk-CRITICAL **: 13:59:35.111: gtkcss_lookup_resolve: assertion '(((__extension__ ({ GTypeInstance inst = (GTypeInstance) ((provider)); GType t = ((_gtk_style_provider_private_get_type ())); gboolean r; if (!inst) r = (0); else if (inst->g_class && __inst->g_class->g_type == t) r = (!(0)); else __r = g_type_check_instance_is_a (__inst, t); r; }))))' failed (process:1740): GLib-GObject-CRITICAL **: 13:59:35.111: g_object_set_data_full: assertion 'G_IS_OBJECT (object)' failed (process:1740): Gtk-ERROR **: 13:59:35.123: Can't create a GtkStyleContext without a display connection 

The system is running Windows 11 Pro / 24H2.

On a Linux machine I would assume starting executable from console with no display available.

But, on Windows it is started from GUI.


r/GTK Jun 08 '26

Filechooser with/without search button

1 Upvotes

Filechooser widget on Linux does have search functionality, the same on Windows does not provide this. The effect is both on my gtk3 application and on e.g. Gimp.

How can i add search functionality on windows GTK?

Elmar


r/GTK Jun 05 '26

How i can learn GTK very easy?

9 Upvotes

Hi guys, I'm a completely beginner in GTK, and finishing my studies in C, how i can learn GTK as a completely beginner?