Open anders130 opened 5 days ago
The gicon property can only be null, when something went wrong while loading the icon from the tray app.
Are there other errors as well? Does this error appear only with a specific tray app?
Edit: Just tried your config. works fine for me on Arch. with spotify, signal and vesktop as running tray apps. Probably a special case of a tray app is causing the issue.
All apps, i have in the tray, work on the old ags version (currently signal-desktop, ZapZap and vesktop).
I also get no other errors. When i add a print statement to retrieve some info about the item, I also only get null and zeros like this:
print(item.id, item.category, item.iconName, item.gicon)
->null 0 null null
Edit: Still doesn't work, when i stop any of the applications and try with just one or two of them.
Your systemtray code is correct. Except that if (item.iconThemePath) App.add_icons(item.iconThemePath)
is unnecessary, but that won't cause issues.
I can't reproduce it on Arch Linux, I haven't set up nix, so I can't test it there. Maybe you could check the #68 PR, if that fixes it for you. But as item.id is null for your as well, it probably won't. If this issue still persists with that PR I'll look into it more deeply.
I tried to run that PR like this: flake.nix:
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
astal = {
url = "github:aylur/astal?ref=feat/tray-gtk4";
inputs.nixpkgs.follows = "nixpkgs";
};
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
inputs.astal.follows = "astal";
};
};
But when i try to run it I get these Errors.
error: builder for '/nix/store/pcsl5lrlriik579wix9jsamhyl335zxv-astal-tray-0.1.0.drv' failed with exit code 1;
last 25 log lines:
> WARNING: You should add the boolean check kwarg to the run_command call.
> It currently defaults to false,
> but it will default to true in future releases of meson.
> See also: https://github.com/mesonbuild/meson/issues/9300
> Project name: astal-tray
> Project version: 0.1.0
> C compiler for the host machine: gcc (gcc 13.3.0 "gcc (GCC) 13.3.0")
> C linker for the host machine: gcc ld.bfd 2.43.1
> Vala compiler for the host machine: valac (valac 0.56.17)
> Host machine cpu family: x86_64
> Host machine cpu: x86_64
> Configuring config.vala using configuration
> Found pkg-config: YES (/nix/store/946chn5ja4yrvnnc5izwv792cc57xpy8-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
> Run-time dependency glib-2.0 found: YES 2.82.1
> Run-time dependency gobject-2.0 found: YES 2.82.1
> Run-time dependency gio-2.0 found: YES 2.82.1
> Run-time dependency json-glib-1.0 found: YES 1.10.0
> Run-time dependency gdk-pixbuf-2.0 found: YES 2.42.12
> Did not find CMake 'cmake'
> Found CMake: NO
> Run-time dependency appmenu-glib-translator found: NO (tried pkgconfig)
>
> meson.build:42:2: ERROR: Dependency "appmenu-glib-translator" not found, tried pkgconfig
>
> A full log can be found at /build/tray/build/meson-logs/meson-log.txt
For full logs, run 'nix log /nix/store/pcsl5lrlriik579wix9jsamhyl335zxv-astal-tray-0.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/78pzc6qf96d8llc7xg19csf6c7p6v515-my-shell.drv' failed to build
warning: Git tree '/home/jesse/Projects/my-shell' is dirty
error: builder for '/nix/store/pcsl5lrlriik579wix9jsamhyl335zxv-astal-tray-0.1.0.drv' failed with exit code 1;
last 25 log lines:
> WARNING: You should add the boolean check kwarg to the run_command call.
> It currently defaults to false,
> but it will default to true in future releases of meson.
> See also: https://github.com/mesonbuild/meson/issues/9300
> Project name: astal-tray
> Project version: 0.1.0
> C compiler for the host machine: gcc (gcc 13.3.0 "gcc (GCC) 13.3.0")
> C linker for the host machine: gcc ld.bfd 2.43.1
> Vala compiler for the host machine: valac (valac 0.56.17)
> Host machine cpu family: x86_64
> Host machine cpu: x86_64
> Configuring config.vala using configuration
> Found pkg-config: YES (/nix/store/946chn5ja4yrvnnc5izwv792cc57xpy8-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
> Run-time dependency glib-2.0 found: YES 2.82.1
> Run-time dependency gobject-2.0 found: YES 2.82.1
> Run-time dependency gio-2.0 found: YES 2.82.1
> Run-time dependency json-glib-1.0 found: YES 1.10.0
> Run-time dependency gdk-pixbuf-2.0 found: YES 2.42.12
> Did not find CMake 'cmake'
> Found CMake: NO
> Run-time dependency appmenu-glib-translator found: NO (tried pkgconfig)
>
> meson.build:42:2: ERROR: Dependency "appmenu-glib-translator" not found, tried pkgconfig
>
> A full log can be found at /build/tray/build/meson-logs/meson-log.txt
For full logs, run 'nix log /nix/store/pcsl5lrlriik579wix9jsamhyl335zxv-astal-tray-0.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/r8avnwxa3m07k8sxy2cwbiq4km4zzx60-ags-2.0.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/aj5r6dz2gqclf7c1sy5lyvqnr0yv2w2m-nix-shell-env.drv' failed to build
I am not really familliar with meson and am unsure how to fix that bug.
Describe the bug Using the AstalTray-Library, the trayItem-properties are null. I get the following error, when I try to use the
gicon
property:To Reproduce I have my new AGS shell in this repository: https://github.com/anders130/my-shell With nix, you can just run it like this:
The code with the problem is in the file
widget/Bar/SystemTray.tsx
. It is just the SysTray function from the astal js example.Expected behavior A Box with multiple Buttons containing the icon of the respective system-tray application.
Additional context OS: NixOS 24.11.20241105.4aa3656 (Vicuna) x86_64 Kernel: Linux 6.11.6