diff --git a/app.tsx b/app.tsx index 86d98e61..e38c3528 100644 --- a/app.tsx +++ b/app.tsx @@ -5,7 +5,6 @@ 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 () => { if (!GLib.file_test(`${SRC}/scss/scheme/_index.scss`, GLib.FileTest.EXISTS)) @@ -34,13 +33,7 @@ App.start({ 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(); - else App.toggle_window(request.slice(7)); - - log = false; - } else return res("Unknown command: " + request); + else return res("Unknown command: " + request); if (log) console.log(`Request handled: ${request}`); res("OK"); diff --git a/modules/launcher.tsx b/modules/launcher.tsx index 83245ca5..b212b856 100644 --- a/modules/launcher.tsx +++ b/modules/launcher.tsx @@ -8,7 +8,7 @@ import { Apps } from "../services/apps"; import Math, { type HistoryItem } from "../services/math"; import { getAppCategoryIcon } from "../utils/icons"; import { launch } from "../utils/system"; -import { PopupWindow, setupCustomTooltip, TransitionType } from "../utils/widgets"; +import { convertPopupWindowProps, setupCustomTooltip } from "../utils/widgets"; type Mode = "apps" | "files" | "math"; @@ -323,11 +323,7 @@ const LauncherContent = ({ showResults: Variable; entry: Widget.Entry; }) => ( - `launcher ${m}`)} - css={bind(AstalHyprland.get_default(), "focusedMonitor").as(m => `margin-top: ${m.height / 4}px;`)} - > + `launcher ${m}`)}>