chore: lots of improvements, exec apps with uwsm if in usage

also, started using `AstalWp.Endpoint.description` instead of the `name` property when showing device names, thanks to @NotMephisto in #9
This commit is contained in:
retrozinndev
2025-06-15 20:29:16 -03:00
parent 1e0a158b39
commit a669e1acc3
21 changed files with 119 additions and 100 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { ResultWidget, ResultWidgetProps } from "../../widget/runner/ResultWidget";
import AstalApps from "gi://AstalApps";
import { cleanExec, getAstalApps, updateApps } from "../../scripts/apps";
import { execApp, getAstalApps, updateApps } from "../../scripts/apps";
import { Runner } from "../Runner";
import { Astal } from "astal/gtk3";
@@ -15,7 +15,7 @@ export const PluginApps = {
title: app.get_name(),
description: app.get_description(),
icon: Astal.Icon.lookup_icon(app.iconName) ? app.iconName : "application-x-executable-symbolic",
onClick: () => cleanExec(app)
onClick: () => execApp(app)
} as ResultWidgetProps)
);
}
+3 -3
View File
@@ -12,12 +12,12 @@ export const PluginClipboard = {
if(Clipboard.getDefault().history.length < 1)
return new ResultWidget({
icon: "edit-paste-symbolic",
title: "No clipboard items found!",
description: "When something is copied, it'll be shown right here!"
title: "Clipboard is empty",
description: "Copy something and it will be shown right here!"
} as ResultWidgetProps);
return Clipboard.getDefault().history.filter(item => // not the best way to search, but it works
Runner.regExMatch(search, item.id.toString()) || Runner.regExMatch(search, item.preview)).map((item) =>
Runner.regExMatch(search, item.id) || Runner.regExMatch(search, item.preview)).map((item) =>
new ResultWidget({
icon: new Widget.Label({
label: item.id.toString(),