summaryrefslogtreecommitdiff
path: root/app.tsx
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-14 15:41:28 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-14 15:41:28 +1100
commita313624734dde8b2f562eb0815c52e93b00f7986 (patch)
tree18ce329e15814cda92fd3e750fea6f28fcfc6dc7 /app.tsx
parentpopupwindow: allow different anims for show/hide (diff)
downloadcaelestia-shell-a313624734dde8b2f562eb0815c52e93b00f7986.tar.gz
caelestia-shell-a313624734dde8b2f562eb0815c52e93b00f7986.tar.bz2
caelestia-shell-a313624734dde8b2f562eb0815c52e93b00f7986.zip
launcher modes + player controls IPC
Diffstat (limited to 'app.tsx')
-rw-r--r--app.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.tsx b/app.tsx
index db766c8..86d98e6 100644
--- a/app.tsx
+++ b/app.tsx
@@ -4,6 +4,7 @@ import AstalHyprland from "gi://AstalHyprland";
import Bar from "./modules/bar";
import Launcher from "./modules/launcher";
import NotifPopups from "./modules/notifpopups";
+import Players from "./services/players";
import { PopupWindow } from "./utils/widgets";
const loadStyleAsync = async () => {
@@ -29,6 +30,10 @@ App.start({
let log = true;
if (request === "reload css") loadStyleAsync().catch(console.error);
+ else if (request === "media play pause") Players.get_default().lastPlayer?.play_pause();
+ else if (request === "media next") Players.get_default().lastPlayer?.next();
+ else if (request === "media previous") Players.get_default().lastPlayer?.previous();
+ else if (request === "media stop") Players.get_default().lastPlayer?.stop();
else if (request.startsWith("toggle")) {
const window = App.get_window(request.slice(7));
if (window instanceof PopupWindow) window.toggle();