# clauncher

**clauncher** is a simple Bash script designed to provide a convenient way to launch applications on Unix-like systems. It utilizes the fzf (fuzzy finder) tool to offer an interactive and efficient application launching experience.

## Prerequisites

Before using **clauncher**, ensure that you have the following dependencies installed:

- [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder.

## Installation

1. Clone the repository to your local machine:

    ```bash
    git clone https://git.slc.ar/slococo/clauncher.git
    ```

2. Change into the project directory:

    ```bash
    cd clauncher
    ```

4. Install the script globally using:

    ```bash
    sudo make install
    ```

   This will move the `clauncher` script to `/usr/local/bin`, making it accessible system-wide.

5. To uninstall, use:

    ```bash
    sudo make uninstall
    ```

   This will remove the `clauncher` script from `/usr/local/bin`.

## Usage

### Basic Usage

Run the `clauncher` script in your terminal:

```bash
./clauncher
```

or if `/usr/local/bin` is in your `PATH` (it should be):

```bash
clauncher
```

This will present you with a list of applications to choose from using the fzf interface.

### Keyboard Shortcuts

- **Arrow Up/Down:** Navigate through the list.
- **Enter:** Launch the selected application.
- **Ctrl-C:** Exit the launcher without launching any application.

## Configuration

**clauncher** creates a cache file (`$XDG_CACHE_HOME/launcher_opts`) and a history file (`$XDG_CACHE_HOME/launcher_opts_history`) to improve performance and remember your application launch history. The cache and history files are generated in the respective XDG standard directories, falling back to default locations if the XDG variables are not set.

The configuration directory is `$XDG_CONFIG_HOME/clauncher` (or `$HOME/.config/clauncher` if `XDG_CONFIG_HOME` is not set), where you can find:

- `capture.zsh`: A script to capture the available applications on your system.
- `.open_ignore`: A list of applications to ignore.
- `.open_add`: A list of additional applications to include.

## License

This project is licensed under the MIT License.

## Contributions

Feel free to contribute, report issues, or suggest improvements!