Skip to content

v2.0.0

Compare
Choose a tag to compare
@Aylur Aylur released this 13 Nov 23:25
· 38 commits to main since this release

After a lot of work, here is the release of AGS v2.

The core functionality of AGS has been reimplemented from scratch in Vala and C and was named Astal.
Services are now standalone libraries and can be cherry picked. Most of them also include a cli tool
to make them even more versatile. For example they could be paired with Eww.

I was debating whether to keep this project alive or move everything into Astal, but as Astal
was starting to get feature complete I realized what made AGS easy to use was missing. Namely
Astal in TypeScript/JavaScript requires a build step and it was not very convenient to just get started with.

Turns out there are quite a few things to consider when bundling and setting up a project especially when someone is not familiar with the mess of js tooling. So I repurposed AGS to act as a scaffolding tool for Astal projects written in TS/JS, while features are
done in Astal, bundling is outsourced to AGS.

Astal vs AGS v1

New features are:

  • TypeScript support ootb
  • JSX
  • widget fixes
    • EventBox hover, and hover-lost signals will now correctly work even when they are at the edge of a window.
    • Setting the size or the icon if an Icon widget will no longer flicker.
  • no more globals like App, Service and Utils
  • no more Service.import or resource:///com/github/aylur/ags, simply import from astal or gi://LibName
  • Service is no longer a thing, for "custom services" just simply subclass GObject.Object
  • instead of Service.register you can now use decorators
  • the cli client no longer uses dbus, which should be it a lot more faster
  • the cli client is a lot more powerful
    • there is no need for setting variables and functions global to then access them on cli
    • you can define a requestHandler which handles messages coming from the cli

AGS v2 bundler

This project is simply meant to be an esbuild distribution.

Currently it has a few plugins builtin:

  • importing .css will inline it in as a string
  • importing .scss will transpile them and inline it as a string
  • importing .blp will compile them and inline the xml as a string
  • importing something with inline: prefix will inline the file's contents as a string

Since Astal is a library it lost App.configDir.
The goal of these plugins is to be able to bundle everything into a single
executable and avoiding having to refer to files outside the script.
In cases where you still have to refer to the source dir, AGS defines a global SRC variable.

You can:
Setup a starter project with ags init
Generate types when adding new libs with ags types
Bundle the script with ags bundle
And run a project without bundling with ags run

Checkout the Astal website and the new AGS website

Special thanks to

  • kotontrion for writing some of the libraries and overall helping around
  • tokyoB0t for polishing the Lua lib and Lua docs
  • Xoores for being a subscriber on ko-fi from the beginning
  • and everyone else who contributed

I've never really said thanks for donators before, so I'd also like to thank now everyone who donated

  • awsumatt
  • Jas Singh
  • eXia
  • johndoe42
  • kotontrion
  • Rubén L
  • Francois Rigaut
  • Keule2
  • The_Branch_Manager
  • Keil Miller Jr
  • Grosheth
  • Iain
  • Harija
  • magic

and especially:

  • JNC
  • Chris Phillips

Also thanks to everyone that picked up Astal while being developed and reported bugs either on Discord or Github.