summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-16 23:20:39 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-16 23:20:39 +1100
commit6d5805e66204caa599a8a2996238adf7931cb95b (patch)
tree49855ba4e35506cb936ecef692386c4bd8603016
parentbase popdown window (diff)
downloadcaelestia-shell-6d5805e66204caa599a8a2996238adf7931cb95b.tar.gz
caelestia-shell-6d5805e66204caa599a8a2996238adf7931cb95b.tar.bz2
caelestia-shell-6d5805e66204caa599a8a2996238adf7931cb95b.zip
refactor: move popdowns to own folder
And group them like osds
-rw-r--r--app.tsx6
-rw-r--r--src/modules/popdowns/index.tsx9
-rw-r--r--src/modules/popdowns/notifications.tsx (renamed from src/modules/notifications.tsx)4
-rw-r--r--src/modules/popdowns/updates.tsx (renamed from src/modules/updates.tsx)6
4 files changed, 16 insertions, 9 deletions
diff --git a/app.tsx b/app.tsx
index 9743792..66cc1ca 100644
--- a/app.tsx
+++ b/app.tsx
@@ -2,10 +2,9 @@ import { execAsync, GLib, writeFileAsync } from "astal";
import { App } from "astal/gtk3";
import Bar from "./src/modules/bar";
import Launcher from "./src/modules/launcher";
-import Notifications from "./src/modules/notifications";
import NotifPopups from "./src/modules/notifpopups";
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 Players from "./src/services/players";
@@ -26,8 +25,7 @@ App.start({
<NotifPopups />;
<Osds />;
Monitors.get_default().forEach(m => <Bar monitor={m} />);
- <Notifications />;
- <Updates />;
+ <Popdowns />;
console.log("Caelestia started");
},
diff --git a/src/modules/popdowns/index.tsx b/src/modules/popdowns/index.tsx
new file mode 100644
index 0000000..db3245b
--- /dev/null
+++ b/src/modules/popdowns/index.tsx
@@ -0,0 +1,9 @@
+import Notifications from "./notifications";
+import Updates from "./updates";
+
+export default () => {
+ <Notifications />;
+ <Updates />;
+
+ return null;
+};
diff --git a/src/modules/notifications.tsx b/src/modules/popdowns/notifications.tsx
index 85747ce..bb08c13 100644
--- a/src/modules/notifications.tsx
+++ b/src/modules/popdowns/notifications.tsx
@@ -1,8 +1,8 @@
import { bind } from "astal";
import { Astal, Gtk } from "astal/gtk3";
import AstalNotifd from "gi://AstalNotifd";
-import Notification from "../widgets/notification";
-import PopdownWindow from "../widgets/popdownwindow";
+import Notification from "../../widgets/notification";
+import PopdownWindow from "../../widgets/popdownwindow";
const List = () => (
<box
diff --git a/src/modules/updates.tsx b/src/modules/popdowns/updates.tsx
index feaa3cd..359fe81 100644
--- a/src/modules/updates.tsx
+++ b/src/modules/popdowns/updates.tsx
@@ -1,8 +1,8 @@
import { bind, execAsync, Variable } from "astal";
import { App, Astal, Gtk } from "astal/gtk3";
-import Updates, { Repo as IRepo, Update as IUpdate } from "../services/updates";
-import { MenuItem } from "../utils/widgets";
-import PopdownWindow from "../widgets/popdownwindow";
+import Updates, { Repo as IRepo, Update as IUpdate } from "../../services/updates";
+import { MenuItem } from "../../utils/widgets";
+import PopdownWindow from "../../widgets/popdownwindow";
const constructItem = (label: string, exec: string, quiet = true) =>
new MenuItem({