Home

Awesome

Findex

Screenshot

<p align="center">Findex is a highly customizable application launcher written in Rust and uses GTK3</p>

Table of Contents

<!-- TOC --> <!-- TOC -->

Quick Note

The tyranny of Israel on the Palestinian people is horrifying and heartbreaking. As such, we all should try our best to support the Palestinians from our position. Consider supporting the Palestinians by donating to the Palestinian Red Crescent Society.

ReadMeSupportPalestine

Banner from: https://github.com/Safouene1/support-palestine-banner/

Features

Installation

If you are not using Findex directly from development branch and using latest release, check instructions from the release branch.

Supported OS

Requirements

Automated installation from source

Manual installation from source

Installation from AUR

From repo: findex-git
Prebuilt: findex-bin

After that, add findex-daemon to autostart/startup applications

Notes

Customization

Findex can be customized by applying properties to certain css classes. Below is a table containing class names and what they correspond to:

ClassWidget
findex-windowTop level window
findex-containerTop level container of all widgets
findex-queryText input box where user gives query
findex-results-scrollScrollable container containing ListBox that shows search results
findex-resultsListbox containing search results
findex-result-rowListBoxRow containing single search result
findex-result-iconApp icon of result row
findex-result-app-nameApp name of result row
findex-result-app-descriptionDescription of the app
findex-result-app-commandCommand of the app
findex-result-trigger-shortcutShortcut for running the command in the result
findex-result-icon-containerContainer of the icon of each result
findex-result-info-containerContainer of the info of each result
findex-query-containerContainer of the search box

To customize Findex, edit the style.css file in ~/.config/findex. If there is no such file, run Findex to generate it.

Behaviour can be changed by modifying ~/.config/findex/settings.toml. If there is no such file, run Findex to generate it.

NameDescriptionType
default_window_widthSet default width of the windowInteger
min_content_heightMinimum content height of resultInteger
max_content_heightMaximum content height of resultInteger
name_match_highlight_colorColor of matches highlighted in app nameString
min_scoreMinimum Score of app name matchInteger
result_sizeMaximum amount of apps to show as resultInteger
toggle_keyKey to toggle Findex(eg. <Alt>space). This doesn't work in Wayland. Check Installation for more info.String
decorate_windowShow toolbar of windowBoolean
query_placeholderPlaceholder text to show in query input boxString
close_window_on_losing_focusClose window when it loses focusBoolean
icon_sizeIcon width and height will be set from this valueInteger
entry_iconIcon displayed beside the searchbarString

Plugins

For users

PLUGIN = { path = "PLUGIN PATH", prefix = "OPTIONAL USER DEFINED PREFIX", keyboard_shortcut = "OPTIONAL USER DEFINED KEYBOARD SHORTCUT", config = {} }
PropertyDescription
pathPath to the plugin's .so file
prefixOptional user defined prefix that'll make findex use this instead of the one specified in the plugin.
configPlugin's configuration. Please refer to the plugin's documentation for more information.
keyboard_shortcutOptional custom keyboard shortcut for triggering the plugin(inserts the plugins prefix into the search box). Must be a valid Gtk accelerator.

NOTE: always make sure that the plugins you are using are compatible with the version of Findex you are using.

For developers

Only Rust based plugins are supported.

use findex_plugin::{define_plugin, FResult};
use abi_stable::std_types::*;

fn init(config: &RHashMap<RString, RString>) -> RResult<(), RString>  {
    // Set up your plugin using the config if necessary
    // Return RErr if something went wrong
    
    // Returning this indicates that the plugin initialization is successful
    ROk(())
}

fn handle_query(query: RStr) -> RVec<FResult> {
    let mut result = vec![];
    
    /* Do stuff here */
    
    RVec::from(result)
}

define_plugin!("prefix!", init, handle_query);
// or add the following if you want to have custom shortcut for triggering the plugin.
// The following sets the shortcut to Ctrl+Shift+P.
// define_plugin!("prefix!", "<Ctrl><Shift>P", init, handle_query);

Explanation

Prefix

This is used to invoke the plugin's query handler. This is the first argument of the define_plugin! macro. User can overwrite this by providing a custom prefix like following:

PLUGIN = { prefix = "custom_prefix!", path = "plugin_path", config = {} }

Keyboard shortcut

This is used to invoke the plugin's query handler using shortcut keys. This is the second argument of the define_plugin! macro. Under the hood, Findex inserts the prefix for the plugin into the search box when it's pressed.

PLUGIN = { keyboard_shortcut = "<Ctrl><Shift>P", path = "plugin_path", config = {} }

init function

The init function is the function that Findex calls during startup. Plugins may use this to do necessary initialization. Plugins that do not need any initialization can just return without doing anything. The first argument of the function is plugin specific configuration.

The user may provide configuration in the following format:

PLUGIN = { path = "plugin_path", config = { key1 = "value1", key2 = "value2" } }

As you can see, every key will have a string value. This function is the third argument of the define_plugin! macro.

handle_query function

This function gets called every time a user invokes the plugin by typing the prefix. The first argument is the query the user typed after the prefix. The function is expected to return a RVec containing results(if any). This function is the fourth argument of the define_plugin! macro.

Reporting Bugs

If you find any bugs, please create an issue and include the latest log from ~/.findex-logs.