import { Gtk } from "ags/gtk4"; import { createBinding, With } from "ags"; import { variableToBoolean } from "../../scripts/utils"; import { getAppIcon, getSymbolicIcon } from "../../scripts/apps"; import Pango from "gi://Pango?version=1.0"; import AstalHyprland from "gi://AstalHyprland"; const hyprland = AstalHyprland.get_default(); // Fix empty focused-client on opening a window on an empty workspace hyprland.connect("client-added", () => hyprland.notify("focused-client")); export const FocusedClient = () => { const focusedClient = createBinding(hyprland, "focusedClient"); return {(focusedClient) => focusedClient?.class && getSymbolicIcon(clss) ?? getAppIcon(clss) ?? getAppIcon(focusedClient.initialClass) ?? "application-x-executable-symbolic" )} vexpand /> } ; }