Skip to main content

Fredo

Fredo is an attempt to copy some of Alfred's features to run on linux (X11).

Fredo was a POC project originally made to follow a book, but since It actually became useful to me I'm opening the repo with It's obvious flaws.

How It Works

Fredo implements a simple interface written in kivy that receives input from the user. The input is then parsed at runtime by Fredo that resolves what plugin should be used to get options for the current query. Thus, Fredo works with prefixes. One can have a prefix 'p' for running python scripts for example, or the prefix 'y' to quickly search and open youtube.

Plugins are just python classes that implements two methods: get_options and action. The former takes in the current query and returns a list of options, the latter is a definition of the action to take when the user selects an option, like copying to the clipboard or opening a document.

Writing a Plugin

This will propably change, but to write a plugin you should write a python class that inherit the Plugin class, from fredo.plugins.base. Your class should implement at least two methods:

action(command)

This is the method that will run once the user selects an option. The command argument is a string defined in the option.

get_options(query)

This is the method that gives the options to the user. It receives a query, and It should return a list of options. An option is defined as a dict with a title key, an optional subtitle key (that will be displayed in the gui) and with a command key that will be passed to the action method one the option is selected.

Defining plugins and prefixes

For the moment, Alfredo gets Its configs from the conf.py file in the root of the project. There you can find simple examples on how the plugins and prefixes are set.

Drawbacks

To aviod a frozen screen while expensive functions run to search for results (like searching for files in a disk or querying a slow api), every time the user types a new character a new process is spawned to handle the plugin's search for results, taking place of the previous process that is brutally killed. That means that It's not possible to cache the results, and that a lot of processes are created and killed while using Alfredo. I don't really know how to handle this and would appreciate any help on the matter.

The executable app is built using PyInstaller and at the moment I couldn't find a simpler way to distribute It.

There is no decent dependency management yet (some default actions assume that the user has a certain package installed, like xclip).

Metadata

Release files for fredo 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fredo 0.0.2
File Size Uploaded Provenance
fredo-0.0.2.tar.gz 9.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fredo 0.0.2
File Interpreter ABI Platform
fredo-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / fredo-0.0.2.tar.gz

Download URL fredo-0.0.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7411106a86227d8d525329a0582a2d43ea5720aacc11de81684512e2c411f23
BLAKE2b-256 checksum
How to use checksums
b37c1f8851893ebf0005b9914ddd5442c8cc643a7a60ed531e454e9946293bb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Release files / fredo-0.0.2-py3-none-any.whl

Download URL fredo-0.0.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df41cb001bf50a4bc7a6bbe0fb7c0333aba1c44a4d9ea37505a8a422e773a6b6
BLAKE2b-256 checksum
How to use checksums
6f1a3dc91f66ff293b2c32927c84a1020e62d4044893ed7d7062c2efd3ca2bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Security for fredo 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page