⚡ perf(ags/runner): better code for runner, show results from multiple plugins, use interface to make plugins and more perfomance implementations
This commit is contained in:
+14
@@ -9,8 +9,19 @@ import { Time, timeout } from "astal/time";
|
||||
import { OSD, OSDModes, setOSDMode } from "./window/OSD";
|
||||
import { ControlCenter } from "./window/ControlCenter";
|
||||
|
||||
import { Runner } from "./window/Runner";
|
||||
import { PluginApps } from "./scripts/runner/apps";
|
||||
import { PluginShell } from "./scripts/runner/shell";
|
||||
import { PluginWebSearch } from "./scripts/runner/websearch";
|
||||
|
||||
let osdTimer: (Time|undefined);
|
||||
|
||||
const runnerPlugins: Array<Runner.Plugin> = [
|
||||
new PluginApps(),
|
||||
new PluginShell(),
|
||||
new PluginWebSearch()
|
||||
];
|
||||
|
||||
App.start({
|
||||
instanceName: "astal",
|
||||
requestHandler(request: string, response: (result: any) => void) {
|
||||
@@ -26,6 +37,9 @@ App.start({
|
||||
|
||||
Wireplumber.getDefault().getDefaultSink().connect("notify::volume", () =>
|
||||
!Windows.isVisible(ControlCenter) && triggerOSD(OSDModes.SINK));
|
||||
|
||||
console.log(`[LOG] Adding runner plugins`);
|
||||
runnerPlugins.map(plugin => Runner.addPlugin(plugin));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user