From e2d8754f813e21cc779186b726cbee0859d1b086 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 12 Nov 2024 14:53:56 -0500 Subject: [PATCH] refactor(agsV2): separate some widgets from popup-window for binto prep --- nixosModules/ags-v2/config/configurations/wim.ts | 4 ++-- nixosModules/ags-v2/config/widgets/date/main.tsx | 15 ++------------- nixosModules/ags-v2/config/widgets/date/wim.tsx | 15 +++++++++++++++ .../config/widgets/notifs/{main.tsx => wim.tsx} | 0 4 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 nixosModules/ags-v2/config/widgets/date/wim.tsx rename nixosModules/ags-v2/config/widgets/notifs/{main.tsx => wim.tsx} (100%) diff --git a/nixosModules/ags-v2/config/configurations/wim.ts b/nixosModules/ags-v2/config/configurations/wim.ts index 6c33cebf..3478fb0a 100644 --- a/nixosModules/ags-v2/config/configurations/wim.ts +++ b/nixosModules/ags-v2/config/configurations/wim.ts @@ -7,11 +7,11 @@ export default async() => { const AppLauncher = (await import('../widgets/applauncher/main')).default; const Bar = (await import('../widgets/bar/wim')).default; const BgFade = (await import('../widgets/bg-fade/main')).default; - const Calendar = (await import('../widgets/date/main')).default; + const Calendar = (await import('../widgets/date/wim')).default; const Clipboard = (await import('../widgets/clipboard/main')).default; const Corners = (await import('../widgets/corners/main')).default; const IconBrowser = (await import('../widgets/icon-browser/main')).default; - const { NotifPopups, NotifCenter } = await import('../widgets/notifs/main'); + const { NotifPopups, NotifCenter } = await import('../widgets/notifs/wim'); const OSD = (await import('../widgets/osd/main')).default; const PowerMenu = (await import('../widgets/powermenu/main')).default; const Screenshot = (await import('../widgets/screenshot/main')).default; diff --git a/nixosModules/ags-v2/config/widgets/date/main.tsx b/nixosModules/ags-v2/config/widgets/date/main.tsx index 4cb4d583..5ded8ff0 100644 --- a/nixosModules/ags-v2/config/widgets/date/main.tsx +++ b/nixosModules/ags-v2/config/widgets/date/main.tsx @@ -1,10 +1,8 @@ import { bind, Variable } from 'astal'; -import { Astal, Gtk } from 'astal/gtk3'; +import { Gtk } from 'astal/gtk3'; import GLib from 'gi://GLib'; -import PopupWindow from '../misc/popup-window'; - const Divider = () => ( { ); }; -const DateWidget = () => { +export default () => { const cal = new Gtk.Calendar({ show_day_names: true, show_heading: true, @@ -86,12 +84,3 @@ const DateWidget = () => { ); }; - -export default () => ( - - - -); diff --git a/nixosModules/ags-v2/config/widgets/date/wim.tsx b/nixosModules/ags-v2/config/widgets/date/wim.tsx new file mode 100644 index 00000000..c8c5dd6d --- /dev/null +++ b/nixosModules/ags-v2/config/widgets/date/wim.tsx @@ -0,0 +1,15 @@ +import { Astal } from 'astal/gtk3'; + +import PopupWindow from '../misc/popup-window'; + +import DateWidget from './main'; + + +export default () => ( + + + +); diff --git a/nixosModules/ags-v2/config/widgets/notifs/main.tsx b/nixosModules/ags-v2/config/widgets/notifs/wim.tsx similarity index 100% rename from nixosModules/ags-v2/config/widgets/notifs/main.tsx rename to nixosModules/ags-v2/config/widgets/notifs/wim.tsx