diff --git a/lib/mk-types/default.nix b/lib/mk-types/default.nix index abd74e61..fc397453 100644 --- a/lib/mk-types/default.nix +++ b/lib/mk-types/default.nix @@ -12,7 +12,7 @@ in pname = "${pname}-types"; version = "0.0.0"; - npmDepsHash = "sha256-8De8tRUKzRhD1jyx0anYNPMhxZyIr2nI45HdK6nb8jI="; + npmDepsHash = "sha256-3ll4Xd5F8ZH/7q/gOF0jgerM6QRk71d93XIwtDssfxU="; src = ./.; dontNpmBuild = true; @@ -22,8 +22,7 @@ in ${concatMapStringsSep "\n" (p: "-g ${p.package.dev}/share/gir-1.0 \\") withGirNames} -g ${ts-for-gir-src}/girs \ --ignoreVersionConflicts \ - --package \ - -e gjs -o ./types + -o ./types ''; installPhase = '' diff --git a/lib/mk-types/package-lock.json b/lib/mk-types/package-lock.json index 47c396a2..50c53818 100644 Binary files a/lib/mk-types/package-lock.json and b/lib/mk-types/package-lock.json differ diff --git a/lib/mk-types/package.json b/lib/mk-types/package.json index 3aaa4533..5027ded4 100644 --- a/lib/mk-types/package.json +++ b/lib/mk-types/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@ts-for-gir/cli": "^3.3.0" + "@ts-for-gir/cli": "4.0.0-beta.16" } } diff --git a/nixosModules/ags/v2/widgets/bar/fullscreen.tsx b/nixosModules/ags/v2/widgets/bar/fullscreen.tsx index 9ae89b65..a73603ca 100644 --- a/nixosModules/ags/v2/widgets/bar/fullscreen.tsx +++ b/nixosModules/ags/v2/widgets/bar/fullscreen.tsx @@ -51,7 +51,10 @@ export default ({ gdkmonitor = Gdk.Display.get_default()?.get_monitor(0) as Gdk.Monitor, child, ...rest -}: Widget.WindowProps) => { +}: { + anchor: Astal.WindowAnchor + gdkmonitor?: Gdk.Monitor +} & Widget.WindowProps) => { const monitor = get_hyprland_monitor_desc(gdkmonitor); const BarVisible = Variable(true); @@ -143,7 +146,6 @@ export default ({ name={`bar-${monitor}`} layer={Astal.Layer.OVERLAY} gdkmonitor={gdkmonitor} - margins={[-1, -1, -1, -1]} anchor={anchor} {...rest} > diff --git a/nixosModules/ags/v2/widgets/bar/items/battery.tsx b/nixosModules/ags/v2/widgets/bar/items/battery.tsx index 2b8c84c8..883ca22d 100644 --- a/nixosModules/ags/v2/widgets/bar/items/battery.tsx +++ b/nixosModules/ags/v2/widgets/bar/items/battery.tsx @@ -1,4 +1,4 @@ -import { bind, Widget } from 'astal'; +import { bind } from 'astal'; import AstalBattery from 'gi://AstalBattery'; const Battery = AstalBattery.get_default(); @@ -7,12 +7,11 @@ import Separator from '../../misc/separator'; const LOW_BATT = 20; -const SPACING = 8; export default () => ( { + setup={(self) => { const update = () => { const percent = Math.round(Battery.get_percentage() * 100); const level = Math.floor(percent / 10) * 10; @@ -37,7 +36,7 @@ export default () => ( }} /> - + diff --git a/nixosModules/ags/v2/widgets/bar/items/current-client.tsx b/nixosModules/ags/v2/widgets/bar/items/current-client.tsx index e355bee0..b25b6f45 100644 --- a/nixosModules/ags/v2/widgets/bar/items/current-client.tsx +++ b/nixosModules/ags/v2/widgets/bar/items/current-client.tsx @@ -1,6 +1,4 @@ -import { bind, Widget } from 'astal'; - -import Pango from 'gi://Pango?version=1.0'; +import { bind } from 'astal'; import AstalApps from 'gi://AstalApps?version=0.1'; const Applications = AstalApps.Apps.new(); @@ -11,8 +9,6 @@ const Hyprland = AstalHyprland.get_default(); import Separator from '../../misc/separator'; -const SPACING = 8; - export default () => { const focused = bind(Hyprland, 'focusedClient'); @@ -23,10 +19,10 @@ export default () => { > { + setup={(self) => { self.hook(Hyprland, 'notify::focused-client', () => { const app = Applications.query( - Hyprland.get_focused_client().get_class(), + Hyprland.get_focused_client()?.get_class() ?? '', false, )[0]; @@ -35,12 +31,12 @@ export default () => { }} /> - + {focused.as((client) => (client && (