From df4c505097b0394d1a75565c2a5e8b47837c3050 Mon Sep 17 00:00:00 2001 From: Aylur Date: Fri, 1 Nov 2024 14:01:05 +0000 Subject: apps: remove redundant properties there is no need for the enable properties since setting the multiplier to a non zero or zero value is the same thing --- docs/guide/libraries/apps.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/guide/libraries/apps.md b/docs/guide/libraries/apps.md index 7f9ee6e..d778e87 100644 --- a/docs/guide/libraries/apps.md +++ b/docs/guide/libraries/apps.md @@ -55,8 +55,9 @@ astal-apps --help import Apps from "gi://AstalApps" const apps = new Apps.Apps({ - includeEntry: true, - includeExecutable: true, + nameMultiplier: 2, + entryMultiplier: 0, + executableMultiplier: 2, }) for (const app of apps.fuzzy_query("spotify")) { @@ -68,8 +69,9 @@ for (const app of apps.fuzzy_query("spotify")) { from gi.repository import AstalApps as Apps apps = Apps.Apps( - include_entry=True, - include_executable=True, + name_multiplier=2, + entry_multiplier=0, + executable_multiplier=2, ) for app in apps.fuzzy_query("obsidian"): @@ -81,8 +83,9 @@ for app in apps.fuzzy_query("obsidian"): local Apps = require("lgi").require("AstalApps") local apps = Apps.Apps({ - include_entry = true, - include_executable = true, + name_multiplier = 2, + entry_multiplier = 0, + executable_multiplier = 2, }) for _, app in ipairs(apps:fuzzy_query("lutris")) do @@ -91,7 +94,15 @@ end ``` ```vala [ Vala] -// Not yet documented, contributions are appreciated +var apps = new AstalApps.Apps() { + name_multiplier = 2, + entry_multiplier = 0, + executable_multiplier = 2, +}; + +foreach (var app in apps.fuzzy_query("firefox")) { + print(app.name); +} ``` ::: -- cgit v1.2.3