https://github.com/trygveaa/kitty-hints-mouse-click
Kitty hints processor for mouse clicking
https://github.com/trygveaa/kitty-hints-mouse-click
Last synced: 11 months ago
JSON representation
Kitty hints processor for mouse clicking
- Host: GitHub
- URL: https://github.com/trygveaa/kitty-hints-mouse-click
- Owner: trygveaa
- License: gpl-3.0
- Created: 2020-04-12T16:55:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-28T22:02:03.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T18:49:31.876Z (over 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kitty hints processor for mouse clicking
This is a [custom
processor](https://sw.kovidgoyal.net/kitty/kittens/hints.html#completely-customizing-the-matching-and-actions-of-the-kitten)
for the [hints kitten](https://sw.kovidgoyal.net/kitty/kittens/hints.html) in
the [kitty terminal emulator](https://sw.kovidgoyal.net/kitty/) which allows
you to send mouse click events to the program running in the terminal emulator.
## Installation
Place the `hints_mouse_click.py` file in the same directory as `kitty.conf`.
If you want to match against emojis, you have to install the
[emoji](https://pypi.org/project/emoji/) package.
Map a key to launch the hints kitten with this processor. E.g. for using
`kitty_mod+y` to right click on emojis add this to `kitty.conf`:
```
map kitty_mod+y kitten hints --type emoji --customize-processing hints_mouse_click.py right
```
## Usage
This is used just like the standard hints kitten, except for these differences:
- You can specify the mouse button you want to use as the last argument. This
can be `left`, `middle`, `right`, `scroll_up`, `scroll_down`, `scroll_left`,
`scroll_right`, `back` or `forward`. Defaults to `left` if not specified.
- The `--type` option supports `emoji` and `emoji_char_and_name` in addition to
the standard types. `emoji` will match emoji characters.
`emoji_char_and_name` will in addition match the regex `:[a-z0-9_+-]+:` which
is typically how emojis are represented by name in ascii. These two types
force `--minimum-match-length` to `1` to be able to match emojis.