diff --git a/flake.lock b/flake.lock index d001e45b..f722e6e1 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/nixosModules/ags/config/app.ts b/nixosModules/ags/config/app.ts index 20af41a4..b5f881b4 100644 --- a/nixosModules/ags/config/app.ts +++ b/nixosModules/ags/config/app.ts @@ -1,7 +1,6 @@ // TODO: persisting data like bluetooth // TODO: quick-settings // TODO: music player stuff -// TODO: on-screen-keyboard // TODO: see if I can bundle each config separately with nix import { programArgs } from 'system'; diff --git a/nixosModules/ags/config/widgets/bar/items/current-client.tsx b/nixosModules/ags/config/widgets/bar/items/current-client.tsx index e72a0494..3472de46 100644 --- a/nixosModules/ags/config/widgets/bar/items/current-client.tsx +++ b/nixosModules/ags/config/widgets/bar/items/current-client.tsx @@ -5,7 +5,6 @@ import AstalApps from 'gi://AstalApps'; import AstalHyprland from 'gi://AstalHyprland'; import Separator from '../../misc/separator'; -import { hyprMessage } from '../../../lib'; export default () => { @@ -16,14 +15,13 @@ export default () => { const focusedIcon = Variable(''); const focusedTitle = Variable(''); - // FIXME: readd this once client titles are fixed - // let lastFocusedAddress: string | null; + let lastFocusedAddress: string | null; const updateVars = ( client: AstalHyprland.Client | null = hyprland.get_focused_client(), ) => { - // lastFocusedAddress = client ? client.address : null; + lastFocusedAddress = client ? client.address : null; const app = applications.fuzzy_query( client?.class ?? '', @@ -40,25 +38,16 @@ export default () => { } focusedTitle.set(client?.title ?? ''); - /* const id = client?.connect('notify::title', (c) => { + const id = client?.connect('notify::title', (c) => { if (c.get_address() !== lastFocusedAddress) { c.disconnect(id); } - console.log(c.get_title()); focusedTitle.set(c.get_title()); - });*/ + }); }; updateVars(); - // hyprland.connect('notify::focused-client', () => updateVars()); - hyprland.connect('event', async() => { - try { - updateVars(JSON.parse(await hyprMessage('j/activewindow'))); - } - catch (e) { - console.log(e); - } - }); + hyprland.connect('notify::focused-client', () => updateVars()); return ( {