A krunner plugin that looks at the YAML file for Bazzite Portal, puts it in Plasma Search, then calls Bazzite Portal to highlight the option if it is selected.
This is only made possible by:
- Heavy inspiration from the Krunner-Bazaar project,
- Some very helpful documentation on develop.kde.org,
- Some liberal use of LLMs (not agentic AI!) to help set up stuff like the header and build initially.
From Source
Requires Podman. Tested on Bazzite.
just build
just installBuilding RPM Locally
# Build RPM package
just rpmnote: It will try to build against the latest tag, you'll need to make a new release/tag first to build the rpm.
Will be added once Bazzite Portal has that functionality.
Create a version tag:
just bump-version 1.x.xVerify your changes, then run the following to add the appropriate tag and push the change:
just commit 1.x.xGitHub Actions will hopefully automatically:
- Build the RPM packages
- Create a GitHub release
- Upload RPM artifacts with checksums
The loadActions function takes a look at /usr/share/yafti/yafti.yml, matches it, then runs /usr/bin/yafti_gtk.py (or use which to find the location of yafti_gtk.py as a fallback). At this point the yml will be loaded into memory, and anything with the hidden key will be ignored.
The match function is run by krunner/Plasma Search. The relevance variable is set here, and as krunner displays results in order of relevance, we do some manipulation here to make sure
- results are displayed in order of the yaml;
- title matches are displayed in front of description matches.
The run function runs when the entry is selected in krunner. the script is run with the --action-id ID argument, with ID being the id entry of the yafti.yml file. A little proprocessing is done here because match.Id obtained previously has a krunner-yafti_ prefix, which is not needed.
This means this is also reliant on this, which adds the highlighting part when an action ID is specified in the command arguments.