action#

You can use one of the following hotkey to do anything using the selected item.

This module provides some common actions that you can use directly.

zelfred.action.open_url(url: str)[source]#

Open a URL in the default browser.

zelfred.action.open_url_or_print(url: str)[source]#

Open a URL in the default browser. If it cannot open the browser, for example, if it is in an SSH remote shell, it will print the URL to the terminal.

zelfred.action.open_file(path: Path)[source]#

Open a file in the default application.

zelfred.action.open_file_or_print(path: Path)[source]#

Open a file in the default application. If your system doesn’t support open file, for example, if it is in an SSH remote shell, it will print the path to the terminal.

zelfred.action.copy_text(text: str)[source]#

Copy text to clipboard.

If your system doesn’t support copy to clipboard, for example, if it is in an SSH remote shell, it will raise pyperclip.PyperclipException

zelfred.action.copy_or_print(text: str)[source]#

Copy text to clipboard. If your system doesn’t support copy to clipboard, for example, if it is in an SSH remote shell, it will print the text to the terminal.

zelfred.action.send_mac_notification(title: str, subtitle: str)[source]#

Send a MAC notification.

This feature is based on the macos-notifications Python library.

However, this is not working on MacOS > 11.0, because of the API this library

is using is deprecated. See this discussion for more details https://github.com/Jorricks/macos-notifications/issues/8.