import { bind, Widget } from 'astal'; import Pango from 'gi://Pango?version=1.0'; import AstalApps from 'gi://AstalApps?version=0.1'; const Applications = AstalApps.Apps.new(); import AstalHyprland from 'gi://AstalHyprland?version=0.1'; const Hyprland = AstalHyprland.get_default(); import Separator from '../../misc/separator'; const SPACING = 8; export default () => { const focused = bind(Hyprland, 'focusedClient'); return ( { self.hook(Hyprland, 'notify::focused-client', () => { const app = Applications.query( Hyprland.get_focused_client().get_class(), false, )[0]; self.set_icon(app.iconName ?? ''); }); }} /> {focused.as((client) => (client && ( ); };