Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.6 KB

Readme.md

File metadata and controls

56 lines (39 loc) · 1.6 KB

Gtk4 Applications Example

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

gtk4python_page1 gtk4python_page2 gtk4python_page3 gtk4python_page4 gtk4python_page5