feat(ags4): add Kompass

This commit is contained in:
matt1432 2025-01-05 20:23:44 -05:00
parent 64e1d3f7ce
commit 9fed14cba5
6 changed files with 63 additions and 5 deletions
flake.lockflake.nix
inputs
lib/pkgs/mk-types
modules/ags

29
flake.lock generated
View file

@ -931,6 +931,34 @@
"type": "github"
}
},
"kompass": {
"inputs": {
"astal": [
"astal"
],
"nixpkgs": [
"kompass",
"astal",
"nixpkgs"
],
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1735898095,
"narHash": "sha256-CVbOLmtou6wjzIXYvTwLNQpqH5ilFzkHYMesqXuvQdU=",
"owner": "kotontrion",
"repo": "kompass",
"rev": "6faee1808b4bc7e0892fff86364151b83f0688a3",
"type": "github"
},
"original": {
"owner": "kotontrion",
"repo": "kompass",
"type": "github"
}
},
"lib-aggregate": {
"inputs": {
"flake-utils": [
@ -1697,6 +1725,7 @@
"jellyfin-flake": "jellyfin-flake",
"jovian": "jovian",
"khepri": "khepri",
"kompass": "kompass",
"lib-aggregate": "lib-aggregate",
"libratbag-src": "libratbag-src",
"material-rounded-theme-src": "material-rounded-theme-src",

View file

@ -201,6 +201,15 @@
repo = "khepri";
type = "github";
};
kompass = {
inputs = {
astal.follows = "astal";
systems.follows = "systems";
};
owner = "kotontrion";
repo = "kompass";
type = "github";
};
lib-aggregate = {
inputs.flake-utils.follows = "flake-utils";
owner = "nix-community";

View file

@ -165,6 +165,13 @@ let
inputs.astal.follows = "astal";
};
kompass = mkInput {
owner = "kotontrion";
repo = "kompass";
inputs.astal.follows = "astal";
};
gtk-session-lock = mkDep {
owner = "Cu3PO42";
repo = "gtk-session-lock";

View file

@ -11,7 +11,7 @@
buildPhase = ''
npx @ts-for-gir/cli generate \
${concatMapStringsSep "\n" (p: " ${p.girName} \\") withGirNames}
${concatMapStringsSep "\n" (p: " -g ${p.package.dev}/share/gir-1.0 \\") withGirNames}
${concatMapStringsSep "\n" (p: " -g ${p.package.dev or p.package}/share/gir-1.0 \\") withGirNames}
-g ${ts-for-gir-src}/girs \
--ignoreVersionConflicts \
-o ./types

View file

@ -1,6 +1,8 @@
import { App, Astal, Gtk } from 'astal/gtk4';
import { Variable } from 'astal';
import Kompass from 'gi://Kompass';
import { Box, Button, Calendar, CenterBox, Label, MenuButton, Popover, Window } from './subclasses';
const { EXCLUSIVE } = Astal.Exclusivity;
@ -29,7 +31,7 @@ export default () => {
application={App}
>
<CenterBox cssName="centerbox">
<Button onClicked="echo hi" />
<Kompass.Tray />
{styledBox}

View file

@ -5,9 +5,10 @@ self: {
pkgs,
...
}: let
inherit (self.inputs) ags astal gtk-session-lock;
inherit (self.inputs) ags astal gtk-session-lock kompass;
gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default;
libKompass = kompass.packages.${pkgs.system}.libkompass;
inherit (lib) attrValues boolToString filter getExe mkIf optionalAttrs optionals;
@ -55,7 +56,17 @@ in {
wireplumber
;
inherit gtkSessionLock;
inherit
gtkSessionLock
libKompass
;
# libkompass dependencies
inherit
(astal.packages.${pkgs.system})
cava
river
;
inherit
(pkgs)
@ -122,7 +133,7 @@ in {
pname = "ags";
configPath = "${cfg.configDir}/@girs";
packages = filter (x:
x.pname != "libadwaita")
x.pname != "libadwaita" && x.pname != "libkompass")
cfg.astalLibs;
})
// (buildGirTypes {