37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
# foot scripts
|
|
|
|
[foot]: https://codeberg.org/dnkl/foot
|
|
[`wtype`]: https://github.com/atx/wtype
|
|
|
|
This repository contains scripts for [foot].
|
|
|
|
## `foot-command`
|
|
|
|
This script implements a command palette for Foot. It allows you to
|
|
interactively pick a command defined in your `foot.ini` keybindings, and
|
|
simulate its corresponding keypress with [`wtype`]. Here's how it works:
|
|
|
|
1. Parses keybindings from the `[key-bindings]` section of `foot.ini`.
|
|
2. Pipes the list of commands to a picker and waits for a selection.
|
|
3. Sends the mapped keypress to to the focused window using `wtype`.
|
|
|
|
### Dependencies
|
|
|
|
- [`wtype`].
|
|
- A dmenu-compatible picker (e.g. `fuzzel`).
|
|
|
|
### Usage
|
|
|
|
```sh
|
|
foot-command.py [-c PATH_TO_CONFIG] [-p PICKER_COMMAND]
|
|
```
|
|
|
|
I recommend binding this to a key in your window manager. You need to invoke the
|
|
command when Foot is the focused window.
|
|
|
|
### Options
|
|
|
|
- `-c`, `--config`: Path to your `foot.ini` file. Defaults to
|
|
`$HOME/.config/foot/foot.ini`.
|
|
- `-p`, `--picker`: Picker to use (must support `dmenu` style input). Defaults
|
|
to `fuzzel --dmenu --placeholder=Select a command:`.
|