Gtk4 Applications Example
April 6, 2022 ยท View on GitHub
Misc classes to build Gtk4 Applications in Gjs and Typescript
It takes the hassle away from building Gtk4 application in Gjs So you can create a cool application, without all the boilerplate code
- main.ts is a sample application
- widgets/*.js contains classes to make it easy to create your UI
Requirements (Fedora 36)
- gtk4
- gjs 1.72.0 (or later)
- node 16 (can be installed via nvm)
sudo dnf install gtk4-devel polkit-devel
npm install
Will properly work fine in other distros, but I have only tested in Fedora 36
Build types
The types in the @types directory were created with ts-for-gir. If you want to create the types yourself install ts-for-gir and run the following command:
npm run build:types
Build Typescript
npm run build:app
Start
npm run start
# or alternatively
gjs -m dist/main.js
Screenshoots
