Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1432 committed Dec 24, 2023
2 parents 77db1de + 02928d5 commit 74f432a
Show file tree
Hide file tree
Showing 49 changed files with 1,435 additions and 944 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ rules:
- 'off'
'@typescript-eslint/no-non-null-assertion':
- 'off'
'@typescript-eslint/no-explicit-any':
- 'off'
'@typescript-eslint/no-unused-vars':
- error
# Vars use a suffix _ instead of a prefix because of file-scope private vars
- varsIgnorePattern: (^unused|_$)
argsIgnorePattern: ^(unused|_)

Expand Down
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
# Unreleased

## Features
- feat: Service.bind and Variable.bind
- feat: AgsWidget.register
- export Widget.createCtor utility
- add: Applications.reload
- add: Utils.idle
- use GLib.shell_parse_argv on Utils.execAsync
- feat: Utils.fetch
- overwrite toJSON method on GObjects
- feat: PowerProfile Service

## Breaking Changes
- update: Hyprland.active.monitor to be an object

# 1.5.5

## Features
- feat: support print from client with --run-js
- feat: support shebang with --run-file
- add: Utils.monitorFile
- feat: Utils.readFile and readFileAsync can take a Gio.File
- improve Button, EventBox hover events
- parse passed files starting with .
- feat: binds targetProp can be in kebab, camel or snake case too
- add: hook, on, poll, bind, attribute

# 1.5.4

## Features

- add: notificationForceTimeout option
- add: bluetooth device-added, device-removed signal
- add: cursor property
Expand All @@ -22,10 +39,8 @@
- add: --run-file

## Breaking Changes

- feat: Window.exclusivity
- deprecate: --run-promise cli flag

## Fixes

- overlay pass-through #168
40 changes: 20 additions & 20 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# Planned features/improvements

- [ ] greetd service
- this would allow to create login managers
- services
- [x] power profiles [#218](https://github.com/Aylur/ags/pull/218)
- [ ] greetd - this would allow to create login managers
- [ ] evolution data server - allows for to sync with calendars, todos and contact lists
- [ ] improve Network service - its currently very barebones, and state changes are not properly signaled

- [ ] utility gobject based library in c
- to be able to use wayland protocols especially for lockscreens in the form of a PAM util function for authentication and input inhibitor

- [ ] evolution-data-server service
- allows for to sync with calendars, todos and contact lists

- [ ] fetch util function
- we can currently use `curl` or `wget` but a fetch like the web api would be useful

- [ ] toJSON overridies
- currently logging with `JSON.stringify` isn't very useful
- [x] fetch util function [#187](https://github.com/Aylur/ags/pull/187)
- [x] toJSON overridies [#203](https://github.com/Aylur/ags/pull/203)

- [ ] circular slider widget

- [ ] improve Network service
- its currently very barebones, and state changes are not properly signaled

- subclass more widget
- [ ] Gtk.Fixed
- [ ] Gtk.Grid

- [ ] NixOS module
- [ ] nix binary cache
- Nix
- [ ] NixOS module
- [x] binary cache [#212](https://github.com/Aylur/ags/pull/212)

- [ ] github action to package types
- [ ] maybe? install them at /etc/ags with meson
- [ ] maybe? install them at /etc/ags with meson

- Wiki
- [ ] Frequent GTK issues page
- [ ] Single children issues
- [x] update to use `bind` `hook` `on` `poll`
- [ ] update examples
- [ ] Frequent GTK issues page
- [ ] Single children issues

- [ ] Move wiki to aylur.github.io/ags
- maybe? rename id from com.github.Aylur.ags to io.Aylur.ags

- [ ] Move wiki to aylur.github.io/ags
- maybe? rename id from com.github.Aylur.ags to io.Aylur.ags

- [ ] add JSDoc to most stuff
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('ags', 'c',
version: '1.5.5',
version: '1.6.3',
meson_version: '>= 0.62.0',
license: ['GPL-3.0-or-later'],
default_options: [ 'warning_level=2', 'werror=false', ],
Expand Down
6 changes: 4 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
, networkmanager
, libdbusmenu-gtk3
, gvfs
, libsoup_3
, extraPackages ? []
}:

Expand All @@ -33,15 +34,15 @@ let
in
stdenv.mkDerivation {
pname = "ags";
version = "1.5.5";
version = "1.6.3";

src = buildNpmPackage {
name = "ags";
src = ../.;

dontBuild = true;

npmDepsHash = "sha256-y5kIMnZSU4IV2oCitcXFc6y7oVJxnLCzkA1lvSOrc/k=";
npmDepsHash = "sha256-xTeidwd9VTpuAXoKo8zp26JSV1e9KPJElHztS8DpTvQ=";

installPhase = ''
mkdir $out
Expand Down Expand Up @@ -80,6 +81,7 @@ stdenv.mkDerivation {
networkmanager
libdbusmenu-gtk3
gvfs
libsoup_3
] ++ extraPackages;

meta = with lib; {
Expand Down
33 changes: 20 additions & 13 deletions nix/hm-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,58 @@ self: {
lib,
...
}: let
cfg = config.programs.ags;
inherit (lib) mkMerge types;
inherit (lib.modules) mkIf;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;

defaultAgsPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
cfg = config.programs.ags;
in {
meta.maintainers = [
lib.maintainers.Jappie3
lib.maintainers.Aylur
meta.maintainers = with lib.maintainers; [
Jappie3
Aylur
];

options.programs.ags = with lib; {
options.programs.ags = {
enable = mkEnableOption "ags";

package = mkOption {
type = with types; nullOr package;
default = defaultAgsPackage;
defaultText = literalExpression "ags.packages.${pkgs.stdenv.hostPlatform.system}.default";
description = mkDoc ''
The Ags package to use. Defaults to the one provided by the flake.
defaultText = literalExpression "inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.default";
description = ''
The Ags package to use.
By default, this option will use the `packages.default` as exposed by this flake.
'';
};

configDir = mkOption {
type = with types; nullOr path;
default = null;
example = literalExpression "./ags-config";
description = mkDoc ''
description = ''
The directory to symlink to {file}`$XDG_CONFIG_HOME/ags`.
'';
};

extraPackages = mkOption {
type = with types; listOf package;
default = [];
description = mkDoc ''
description = ''
Additional packages to add to gjs's runtime.
'';
example = lib.literalExpression "[ pkgs.libsoup_3 ]";
example = literalExpression "[ pkgs.libsoup_3 ]";
};
};

config = with lib; mkIf cfg.enable (mkMerge [
config = mkIf cfg.enable (mkMerge [
(mkIf (cfg.configDir != null) {
xdg.configFile."ags".source = cfg.configDir;
})
{
home.packages = lib.optional (cfg.package != null) (cfg.package.override {
home.packages = optional (cfg.package != null) (cfg.package.override {
extraPackages = cfg.extraPackages;
});
}
Expand Down
43 changes: 28 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ags",
"version": "1.5.5",
"version": "1.6.3",
"description": "description",
"main": "src/main.ts",
"repository": "",
Expand All @@ -14,6 +14,7 @@
"@girs/gtk-3.0": "^3.24.39-3.2.2",
"@girs/gvc-1.0": "^1.0.0-3.1.0",
"@girs/nm-1.0": "^1.43.1-3.1.0",
"@girs/soup-3.0": "^3.4.4-3.2.6",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.42.0"
Expand Down
11 changes: 9 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class App extends Gtk.Application {
this._load();
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
connect(signal = 'window-toggled', callback: (_: this, ...args: any[]) => void): number {
return super.connect(signal, callback);
}
Expand Down Expand Up @@ -215,7 +214,7 @@ export class App extends Gtk.Application {

this.emit('config-parsed');
} catch (err) {
console.error(err as Error);
logError(err);
}
}

Expand All @@ -235,6 +234,14 @@ export class App extends Gtk.Application {
);
}

toJSON() {
return {
bus: this.application_id,
configDir: this.configDir,
windows: Object.fromEntries(this.windows.entries()),
};
}

RunJs(js: string, clientBusName?: string, clientObjPath?: string) {
let fn;

Expand Down
Loading

0 comments on commit 74f432a

Please sign in to comment.