Recommendations on creating custom DE from Gtk.Application / ApplicationWindow?

I wrote a Gtk.ApplicationWindow that I’d like to turn into a Desktop Environment. (i.e replace the icons, background, tool bar, everything with this window). Eventually I’d like to hook up workstations too, so it’d have to create a new instance of my custom window and slide the screen to it. Other windows will exist, a button on the tool bar might run gnome-terminal for example.

Is there a recommended way to add a window manager to a python Gtk Application? I’m new on the window-manager side of things. pywayland seems like it wants you to dive into protocols and buffers. Qtile seems it might be past the window manager side of things, and more in the DE space, but maybe I can strip away the DE stuff from it’s config and use that?

I guess is this even the right track? Any advice would be greatly appreciated!

GTK is a toolkit for creating desktop applications, not desktop environments. It does not have everything you need to make a desktop environment - nor would it.

I recommend starting from the Wayland documentation and looking into wlroots - an actual toolkit for building a wayland compositor.

pywayland seems like it wants you to dive into protocols and buffers.

This is unavoidable if you want to build a compositor from scratch. If you don’t want to build something from scratch, you could instead customize a setup based on an existing compositor like sway. If you search for sway (or other compositors) on this subreddit you can get a good idea of what kind of customization is possible without rolling your own compositor.

2 Likes

Awesome, thank you for the help!

I didn’t realize what a compositor was before, looking into that helped too. If I can avoid it, I’d like to avoid writing one from scratch. Seems like Qtile is considered a compositor too, so I’ll try that and sway first and go from there!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.