From 2f5cb5b4a01a91b8564c72cf10403fca47825572 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 25 Dec 2024 03:11:27 -0500 Subject: [PATCH] fix(ags): update and clean up types --- flake.lock | Bin 57792 -> 57792 bytes lib/pkgs/default.nix | 6 +-- modules/ags/config/services/brightness.ts | 1 - modules/ags/config/services/tablet.ts | 8 ++-- modules/ags/config/style/common.scss | 2 +- modules/ags/config/widgets/bar/items/tray.tsx | 10 ++--- modules/ags/packages.nix | 40 ++++++++++++------ 7 files changed, 40 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 0e2882039b4deb152fb7c45e54442b98bec5d5f6..243abcded71694332a558d750c0717e45d948833 100644 GIT binary patch delta 126 zcmV-^0D=F&!vny>1F%#F2Q@G`FgGwalc66SD`R9rZ+9zgWNb8bLU}c5cQ9v9XgPCl zZg+1(Q(-iEb7oCeR&RAtY+*<+li^bqlU)cZk^KiKGdE^1WHK}{H#lK2H8D12Vl*{n gVm325HZ(A0FgIg0WMea8IAu67lYtRSvt0;d*`91EwEzGB delta 125 zcmV-@0D}L(!vny>1F%#F2Q)Y_G&C_clc66SD^e?TOh-w0Y+-S8Pi threshold + 1) { this._screenIcon = SCREEN_ICONS[threshold + 1]; diff --git a/modules/ags/config/services/tablet.ts b/modules/ags/config/services/tablet.ts index 01b1f14a..f00f481a 100644 --- a/modules/ags/config/services/tablet.ts +++ b/modules/ags/config/services/tablet.ts @@ -99,11 +99,11 @@ export default class Tablet extends GObject.Object { return; } - this._inputDetection = subprocess([ - 'fcitx5', + this._inputDetection = subprocess(['fcitx5', '--disable', 'all', - '--enable', 'keyboard,virtualkeyboardadapter,wayland,waylandim', - ]); + '--enable', 'keyboard,virtualkeyboardadapter,wayland,waylandim'], + () => { /**/ }, + () => { /**/ }); } private _stopInputDetection() { diff --git a/modules/ags/config/style/common.scss b/modules/ags/config/style/common.scss index 4d20f311..dc2c7755 100644 --- a/modules/ags/config/style/common.scss +++ b/modules/ags/config/style/common.scss @@ -38,7 +38,7 @@ scale { } } -circular-progress { +circularprogress { background: #363847; min-height: 35px; min-width: 35px; diff --git a/modules/ags/config/widgets/bar/items/tray.tsx b/modules/ags/config/widgets/bar/items/tray.tsx index 40360b4e..39ed6860 100644 --- a/modules/ags/config/widgets/bar/items/tray.tsx +++ b/modules/ags/config/widgets/bar/items/tray.tsx @@ -21,14 +21,14 @@ const TrayItem = (item: AstalTray.TrayItem) => { cursor="pointer" usePopover={false} - // @ts-expect-error types are wrong tooltipMarkup={bind(item, 'tooltipMarkup')} - // @ts-expect-error types are wrong - actionGroup={bind(item, 'actionGroup').as((ag) => ['dbusmenu', ag])} - // @ts-expect-error types are wrong menuModel={bind(item, 'menuModel')} + + setup={(self) => self.hook(item, 'notify::action-group', () => { + self.insert_action_group('dbusmenu', item.actionGroup); + })} > - + ); diff --git a/modules/ags/packages.nix b/modules/ags/packages.nix index a6f8bc16..ca5c0d39 100644 --- a/modules/ags/packages.nix +++ b/modules/ags/packages.nix @@ -7,7 +7,9 @@ self: { }: let inherit (self.inputs) ags gtk-session-lock; - inherit (lib) attrValues boolToString getExe optionalAttrs optionals removeAttrs; + gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default; + + inherit (lib) attrValues boolToString getExe optionalAttrs optionals; inherit (osConfig.networking) hostName; @@ -32,19 +34,31 @@ in { package = ags.packages.${pkgs.system}.ags.override { extraPackages = cfg.astalLibs; }; - astalLibs = - attrValues ( - removeAttrs ags.inputs.astal.packages.${pkgs.system} [ - "cava" - "powerprofiles" - "river" + astalLibs = attrValues { + inherit + (ags.inputs.astal.packages.${pkgs.system}) + io + astal3 + apps + auth + battery + bluetooth + greet + hyprland + mpris + network + notifd + tray + wireplumber + ; - # Not libraries - "docs" - "gjs" - ] - ) - ++ [gtk-session-lock.packages.${pkgs.system}.default pkgs.gtk4]; + inherit gtkSessionLock; + + inherit + (pkgs) + gtk4 # Needed to build types + ; + }; lockPkg = pkgs.writeShellApplication { name = "lock";