refactor: move popdowns to own folder

And group them like osds
This commit is contained in:
2 * r + 2 * t 2025-01-16 23:20:39 +11:00
parent 828da2ce9e
commit 6d5805e662
4 changed files with 16 additions and 9 deletions

View file

@ -2,10 +2,9 @@ import { execAsync, GLib, writeFileAsync } from "astal";
import { App } from "astal/gtk3"; import { App } from "astal/gtk3";
import Bar from "./src/modules/bar"; import Bar from "./src/modules/bar";
import Launcher from "./src/modules/launcher"; import Launcher from "./src/modules/launcher";
import Notifications from "./src/modules/notifications";
import NotifPopups from "./src/modules/notifpopups"; import NotifPopups from "./src/modules/notifpopups";
import Osds from "./src/modules/osds"; import Osds from "./src/modules/osds";
import Updates from "./src/modules/updates"; import Popdowns from "./src/modules/popdowns";
import Monitors from "./src/services/monitors"; import Monitors from "./src/services/monitors";
import Players from "./src/services/players"; import Players from "./src/services/players";
@ -26,8 +25,7 @@ App.start({
<NotifPopups />; <NotifPopups />;
<Osds />; <Osds />;
Monitors.get_default().forEach(m => <Bar monitor={m} />); Monitors.get_default().forEach(m => <Bar monitor={m} />);
<Notifications />; <Popdowns />;
<Updates />;
console.log("Caelestia started"); console.log("Caelestia started");
}, },

View file

@ -0,0 +1,9 @@
import Notifications from "./notifications";
import Updates from "./updates";
export default () => {
<Notifications />;
<Updates />;
return null;
};

View file

@ -1,8 +1,8 @@
import { bind } from "astal"; import { bind } from "astal";
import { Astal, Gtk } from "astal/gtk3"; import { Astal, Gtk } from "astal/gtk3";
import AstalNotifd from "gi://AstalNotifd"; import AstalNotifd from "gi://AstalNotifd";
import Notification from "../widgets/notification"; import Notification from "../../widgets/notification";
import PopdownWindow from "../widgets/popdownwindow"; import PopdownWindow from "../../widgets/popdownwindow";
const List = () => ( const List = () => (
<box <box

View file

@ -1,8 +1,8 @@
import { bind, execAsync, Variable } from "astal"; import { bind, execAsync, Variable } from "astal";
import { App, Astal, Gtk } from "astal/gtk3"; import { App, Astal, Gtk } from "astal/gtk3";
import Updates, { Repo as IRepo, Update as IUpdate } from "../services/updates"; import Updates, { Repo as IRepo, Update as IUpdate } from "../../services/updates";
import { MenuItem } from "../utils/widgets"; import { MenuItem } from "../../utils/widgets";
import PopdownWindow from "../widgets/popdownwindow"; import PopdownWindow from "../../widgets/popdownwindow";
const constructItem = (label: string, exec: string, quiet = true) => const constructItem = (label: string, exec: string, quiet = true) =>
new MenuItem({ new MenuItem({