end-4 / dots-hyprland

i hate minimalism so...
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
4.52k stars 315 forks source link

[Issue] Ags error: TypeError: (intermediate value).getWindow(...) is undefined #223

Closed ogios closed 9 months ago

ogios commented 9 months ago
Click to expand i've installed the ags suggested in here: https://github.com/end-4/dots-hyprland/issues/208#issuecomment-1913120250 but this still happens ```plain (com.github.Aylur.ags:12542): Gjs-WARNING **: 09:31:28.272: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise: _init/GLib.MainLoop.prototype.runAsync/
ogios commented 9 months ago

the old version of ags config works but blocks the top of the window i don't know why:

const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => Widget.Box({
    children: arr(startWorkspace, workspaces).map(workspace),
    properties: [['update', box => {
        execAsync('hyprctl -j clients').then(clients => {
            const json = JSON.parse(clients);
            box.get_children().forEach(ch => ch.update(json));
        }).catch(print);
    }]],
    setup: (box) => box._update(box),
    connections: [
        [Hyprland, box => { if (!App.getWindow(windowName).visible) return; box._update(box); }, 'client-added'],
        [Hyprland, box => { if (!App.getWindow(windowName).visible) return; box._update(box); }, 'client-removed'],
        [App, (box, name, visible) => { // Update on open
            if (name == 'overview' && visible) {
                box._update(box);
            }
        }],
    ],
});

image

clsty commented 9 months ago

c96f8ec no longer works normally with current config of this repo. Try install ags by running ./update-ags.sh.