diff --git a/nixosModules/ags/v2/widgets/bar/items/current-client.tsx b/nixosModules/ags/v2/widgets/bar/items/current-client.tsx index 241a6665..cf985302 100644 --- a/nixosModules/ags/v2/widgets/bar/items/current-client.tsx +++ b/nixosModules/ags/v2/widgets/bar/items/current-client.tsx @@ -11,6 +11,7 @@ import { hyprMessage } from '../../../lib'; export default () => { + const visibleIcon = Variable(false); const focusedIcon = Variable(''); const focusedTitle = Variable(''); @@ -24,7 +25,16 @@ export default () => { client?.get_class() ?? '', )[0]; - focusedIcon.set(app?.iconName ?? ''); + const icon = app?.iconName; + + if (icon) { + visibleIcon.set(true); + focusedIcon.set(icon); + } + else { + visibleIcon.set(false); + } + focusedTitle.set(client?.get_title() ?? ''); const id = client?.connect('notify::title', (c) => { if (c.get_address() !== lastFocused) { @@ -54,6 +64,7 @@ export default () => {