Skip to content

Create Gtk4 applications in Gjs and TypeScript

License

Notifications You must be signed in to change notification settings

gjsify/example-gtk4

 
 

Repository files navigation

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

About

Create Gtk4 applications in Gjs and TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 64.4%
  • Python 33.3%
  • JavaScript 1.5%
  • CSS 0.8%