2023-06-20 10:37:55 +02:00
|
|
|
# binds.conf documentation
|
2023-06-19 00:34:13 +02:00
|
|
|
|
2023-07-20 04:24:06 +02:00
|
|
|
**NOTE: A list of modes, modifiers, keys, functions and what arguments
|
2023-07-20 15:12:38 +02:00
|
|
|
those functions expect can be found in [[Configurable keybinds]].**
|
2023-07-20 04:24:06 +02:00
|
|
|
|
|
|
|
The binds.conf allows key and mouse binds to be configurated outside of the
|
|
|
|
regular spmenu.conf config file.
|
|
|
|
|
|
|
|
This configuration file is primarily used by shell scripts that utilize
|
|
|
|
spmenu. This is because it allows scripts to override keybinds without
|
|
|
|
altering the user's existing configuration file or theming in any way.
|
|
|
|
|
|
|
|
The binds.conf configuration file is nearly identical to spmenu.conf
|
|
|
|
with key and mouse binds. Anything not related to input is not
|
|
|
|
recognized when using this file. Any valid binds.conf will start
|
|
|
|
with `binds = {` as opposed to `spmenu = {` or `theme = {`.
|
|
|
|
|
|
|
|
It should be noted that if the file is loaded, it will override
|
|
|
|
**all** existing binds from the user's regular configuration.
|
|
|
|
|
|
|
|
For example, if you want to have a binds.conf configuration
|
|
|
|
with the only bind being the quit bind, you could do something
|
|
|
|
like this:
|
|
|
|
|
|
|
|
```spmenu config
|
|
|
|
bind = {
|
|
|
|
keys = ( {
|
|
|
|
mode = -1;
|
|
|
|
modifier = "None";
|
|
|
|
key = "Esc";
|
|
|
|
function = "quit";
|
|
|
|
argument = "0";
|
|
|
|
},
|
|
|
|
};
|
|
|
|
```
|
|
|
|
|
|
|
|
This is the exact same format keybinds in the regular config file use.
|
|
|
|
Same goes for mouse binds. This is an example allowing clicking on items
|
|
|
|
and outputting them:
|
|
|
|
|
|
|
|
```spmenu config
|
|
|
|
bind = {
|
|
|
|
mouse = ( {
|
|
|
|
click = "ClickItem";
|
|
|
|
button = "Left Click";
|
|
|
|
function = "selecthover";
|
|
|
|
argument = "0";
|
|
|
|
},
|
|
|
|
};
|
|
|
|
```
|
|
|
|
|
|
|
|
## Supported strings
|
|
|
|
|
|
|
|
Tip: Use `Ctrl+f` to search this list, because it is quite long.
|
|
|
|
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.modifier**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Modifier that must be pressed for the function to be executed
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.mode**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Mode that must be in use for the function to be executed
|
|
|
|
- Type: Integer
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.key**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Key that must be pressed for the function to be executed
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.function**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Function to execute when the conditions are met
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.argument**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Argument passed to the function
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.ignoreglobalkeys**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Ignore hardcoded keybinds
|
|
|
|
- Type: Integer
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.keys.forceinsertmode**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Type: Integer
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.click**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Area where the click must have been for the function to be executed
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.button**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Mouse button that must have been used to click for the
|
|
|
|
function to be executed
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.function**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Function to execute when all conditions are met
|
|
|
|
- Type: string
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.argument**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Argument passed to the function
|
|
|
|
- Type: String
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.ignoreglobalmouse**
|
2023-07-20 04:24:06 +02:00
|
|
|
- Description: Ignore hardcoded mouse binds
|
|
|
|
- Type: Integer
|
2023-07-22 18:36:02 +02:00
|
|
|
- **bind.mouse.scrolldistance**
|
|
|
|
- Description: Distance to scroll for a scroll action to count
|
|
|
|
- Type: Integer
|
|
|
|
- Note: Only applies for Wayland
|
2023-07-20 04:24:06 +02:00
|
|
|
|
|
|
|
## See also
|
|
|
|
|
2023-07-20 15:12:38 +02:00
|
|
|
- [[Configurable keybinds]]
|
2023-07-20 04:24:06 +02:00
|
|
|
- [[spmenu.conf documentation]]
|
|
|
|
- [[theme.conf documentation]]
|